• Hi there,

    I’m trying to insert a next post link, with the default title and limited to the category taxonomy.

    I’ve tried the codex page

    But I am having trouble limiting the category and having the title show up as the actual post title. Code used;

    <?php next_post_link( $format, '%title', $in_same_term = true); ?>

    Could I please get some assistance, or more importantly a reference to how to use the php arguments properly?

    Thanks

Viewing 1 replies (of 1 total)
  • You haven’t defined $format there, so unless this is set somewhere, that’s a problem. You also haven’t defined the parameter for $in_same_term the right way.

    You’d need to use something like this:

    <?php next_post_link( '%link &raquo;', '%title', true ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Next Post Link Function’ is closed to new replies.