How to link prev/next post in parent and child category? (1 post)

  1. antonel1
    Posted 3 years ago #

    I have a parent category titled 'Latest' and its children categories titled 'Painting,' 'Illustration,' 'Photography,' etc. I would like the prev/next to flip through posts within the same child and parent category.

    I used the following code from http://codex.wordpress.org/Template_Tags/next_post_link to help me get the prev/next to flip through posts within the same child category. All works well.

    <?php previous_post_link('%link', 'Previous', TRUE); ?>

    <?php next_post_link('%link', 'Next', TRUE); ?>

    However, when I'm in an entry from the parent category, it flips through posts within the child category it pertains to, not the parent.

    A similar question was asked in the Plugins and Hacks section. However, I brought it over to the 'How-To and Troubleshooting' section as I was hoping to find a none plugin and hack solution. If a plugin is a must, which one is best? Can anyone help us?

    Original question can found here: http://wordpress.org/support/topic/plugin-smarter-navigation-how-to-link-prevnext-post-in-parent-category?replies=5#post-4101845

Topic Closed

This topic has been closed to new replies.

About this Topic