• Hi πŸ™‚

    I need to add the in_same_cat option to my navigation code, but when I add it, what comes up as the title of the post is “1”.

    here’s the code:

    <nav id="nav-single">
      <?php $prev_post = get_previous_post(); ?>
      	<span class="nav-previous"><?php next_post_smart( __( '%link') ); ?><?php next_post_smart(__('<span id="prevlink">Previous Project:<br />%link</span>') ); ?></span>
    
      <?php $next_post = get_next_post(); ?>
      	<span class="nav-next"><?php previous_post_smart( __('%link')); ?><?php previous_post_smart(__('<span id="nextlink">Next Project:<br />%link</span>') ); ?></span>
      </nav><!-- #nav-single -->

    Here’s what I did to add the in_same_cat option in the first link:

    <?php $prev_post = get_previous_post(); ?>
      	<span class="nav-previous"><?php next_post_smart( $format = '%link', $in_same_cat = true ); ?><?php next_post_smart($format = '<span id="prevlink">Previous Project:<br />%link</span>', $in_same_cat = true ); ?></span>

    Alas, that didn’t work. Can someone shine a light on what I’m doing wrong here?

    Thanks!

    http://wordpress.org/extend/plugins/smarter-navigation/

  • The topic ‘[Plugin: Smarter Navigation] Need to add the in_same_cat option to my code’ is closed to new replies.