Portfolio Press
Single Page Navigation in Specific Category only (1 post)

  1. ritalcnyc
    Posted 3 years ago #

    Hi. I'm trying to modify this code here on the single-portfolio.php page:

    <nav id="nav-below">
    				<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'portfoliopress' ); ?></h1>
    				<div class="nav-previous"><?php previous_post_link( '%link', '%title <span class="meta-nav" >' . _x( '&rarr;', 'Previous post link', 'portfoliopress') . '</span>' ); ?></div>
    				<div class="nav-next"><?php next_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Next post link', 'portfoliopress' ) . '</span> %title' ); ?></div>
    			</nav><!-- #nav-below -->

    I would like this navigation to only show items from the specific category the item is in (I already have my menu sorted this way). I know that the key to doing this involves adding the parameter 'true' to the previous_post_link and next_post_link php code, but I can't for the life of me figure out where to put it in the above code.

    Can anyone help?


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic