Exclude a category from previous/next post link

Discussion in 'Figero WordPress Theme' started by rostin, Mar 13, 2013.

Thread Status:
Not open for further replies.
  1. rostin

    rostin Member

    Joined:
    Nov 20, 2012
    Messages:
    88
    Likes Received:
    2
    I would like to exclude a category (e.g. cat 10) from Single Post (previous/next post link).
    I found out from this site that I have to add a new parameter to this section of single.php but I couldn't manage it properly.

    <?php previous_post_link('%link', __('<span class="meta-nav">&larr;</span> Previous Post ', 'figero')); ?>
    </span> <span class="nav-next">
    <?php next_post_link('%link', __('Next Post <span class="meta-nav">&rarr;</span>', 'figero')); ?>

    My theme is Figero Pro.
    I appreciate your help in advance.




     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Use this

    This should work

    <?php previous_post_link('%link', __('<span class="meta-nav">&larr;</span> Previous Post ', 'figero'), TRUE, '10'); ?>
    </span> <span class="nav-next">
    <?php next_post_link('%link', __('Next Post <span class="meta-nav">&rarr;</span>', 'figero'), TRUE, '10'); ?>
     
  3. rostin

    rostin Member

    Joined:
    Nov 20, 2012
    Messages:
    88
    Likes Received:
    2
    It worked. Thanks.
     
Thread Status:
Not open for further replies.

Share This Page