• From the documentation, it seemed to me that with something like that:
    <?php previous_post('previous', ' ', 'yes', 'no', 1) ?>
    I would get a link that said “previous” and linked to previous post. But looks like if I remove the % from the 1st parameter it won’t link anymore. If I put something like that in the 1st parameter: ‘previous: %’ then I get a link including the name of the entry preceded by “previous: ” (that’s what I’m trying to avoid, I just want “previous” and “next” links) so the second parameter seems kinda redundant.
    I feel really stupid ’cause I’m probably totally missing the point here…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Check the Wiki template tags page to see how the previous_post function works… but basically the first parameter is just the format of the pre-link string, and it replaces % with the link… while the second parameter is the actual text of the link. So if you wanted the link itself to be just Previous, you would do the following:

    <?php previous_post('%', 'Previous ', 'yes', 'no', 1) ?>

    Hope that helps!

    Thread Starter misterx

    (@misterx)

    Actually, you’re… wrong 🙂
    But you did give me the info I needed: the WIKI’s link. I’m definitely bookmarking it!
    What needed to be changed was the 3rd parameter (from “yes” to “no” that “Indicates wehther the title should be used in the link text.” It wasn’t clear in the documentation, but it was crystal clear in the WIKI.
    on a side note, the category parameters don’t seem to work at all for me 🙁
    Thanks!! 🙂

    Hey, I was partly right! I just forgot about the title part 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘previous_post / next_post Parameter problems’ is closed to new replies.