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
- Item was Featured
- Author was Featured
- 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
wickedpixel
says
You don’t need to echo anything, that is made by the function.
<div class="previous-post"><h3>'. $variable .'</h3></div>
LovelessDesign
says
I’m stupid. thanks
