next_post_link fails to output ANYTHING as soon as I set third parameter to TRUE
-
Hi Everyone,
I’ve done several searches on this and haven’t been able to find much besides several previously unanswered posts. I’m hoping I just missed something and someone can help me out.
Here’s my situation:
Within single.php for the theme I’m working on:
I’m trying to use the next_post_link tag to pull up the link to the next post in a category. Everything works fine UNTIL I set the third parameter to TRUE (or anything at all) at which point the function fails to output anything at all – no error message, no nothing.For instance:
<?php next_post_link('%link','%title'); ?>
outputs as expected:
<a href="https://correct.photo.link.here" rel="next">this is post 11</a>
All variations on that theme seem to work – BUT – as soon as I add TRUE as the third parameter to set the function to display the next post within the same category, the whole thing dies, and outputs absolutely NOTHING at all, so:
<?php next_post_link('%link','%title', TRUE); ?>
outputs NOTHING at all.
I’ve tried a dozen variations – inside and outside the loop, capitalization changes, putting “TRUE” in different kinds of quotes, and even using “1” instead of TRUE – but none of them work.
I even tried copying and pasting the code directly from the codex and it does the same EXACT thing – it’s making me CRAZY, and deadline is coming up – can anyone please help me?Thanks so much.
T
- The topic ‘next_post_link fails to output ANYTHING as soon as I set third parameter to TRUE’ is closed to new replies.