WordPress.org

Ready to get started?Download WordPress

Forums

Ambrosite Next/Previous Post Link Plus
[resolved] How to link prev/next post in parent and child category? (5 posts)

  1. antonel1
    Member
    Posted 1 year ago #

    Thank you for a great plugin!

    I have a question. I have a parent category titled 'Latest' and its children categories titled 'Painting,' 'Illustration,' 'Photography,' etc. I got the prev/next to flip through posts within the same child category but when I enter the post from the parent category, it flips through posts within the child category it pertains to, not the parent (organized by date). I was hoping to get it to work for parent also. Is this possible?

    I've been trying really hard to get this to work (without and with plugin) but no luck. Your plugin seems to be what I'm looking for. If anyone can help me, I'd greatly appreciate it!

    http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/

  2. antonel1
    Member
    Posted 1 year ago #

    I solved this problem without using the plugin. I used the code below from WordPress Codex. Then make sure that each post has child and parent categories checked off when managing each post.

    I only had child category checked off which is probably why the pagination wasn't working correctly when entering a post from the parent category.

    Simple solution. Not sure why I didn't see that. Sorry about that!

  3. antonel1
    Member
    Posted 1 year ago #

    I thought I solved the problem but I just realized I didn't. Now that I have both child and parent categories checked off, when entering the post from the child category, it flips through the parent category.

    So maybe I will need this plugin after all. Again, I'm trying to get the next/previous post links to work within the same category for child and parent. Is this possible?

  4. greencode
    Member
    Posted 1 year ago #

    I think you're trying to do the same thing as me. I have (as an example)…

    Vehicles
    - Cars
    - - Hatchback
    - - Sports

    And so when I use the Previous/Next button I only want it to go through the same posts within the child category. At the moment it's going through all posts in the main "Vehicles" category.

  5. antonel1
    Member
    Posted 1 year ago #

    Greencode, I think I figured it out with the help of Chavo. Follow this thread: http://wordpress.org/support/topic/plugin-smarter-navigation-how-to-link-prevnext-post-in-parent-category?replies=6 (2 pages). It goes on for awhile but ultimately we got it to work.

    Remember do download the Ambrosite Next/Previous Post Link Plus plugin and to insert the proper codes in footer.php, single.php, and functions.php. Let me know if you have any questions!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic