ThemeForest

Variable inside previous_post_link

123 posts
  • Austria
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
LovelessDesign says

I have a syntax question: How can I use a PHP variable inside the previous_post_link function?

e.g.
<?php previous_post_link('%link','<div class="previous-post"><h3>'. echo $variable ;'</h3></div>'); ?>
2988 posts
  • Community Superstar
  • Has been a member for 5-6 years
  • Won a Competition
  • Sold between 50 000 and 100 000 dollars
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
  • Europe
+1 more
wickedpixel says
You don’t need to echo anything, that is made by the function.
<div class="previous-post"><h3>'. $variable .'</h3></div>
123 posts
  • Austria
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
LovelessDesign says

I’m stupid. thanks

by
by
by
by
by