WordPress.org

Ready to get started?Download WordPress

Forums

Ambrosite Next/Previous Page Link Plus
[resolved] Multiple next/prev page link implementation (3 posts)

  1. Beartooth
    Member
    Posted 1 year ago #

    I have several top-tier pages on different topics (References, Quotations, etc). Each has a tab on the main menu that opens directly to the page. I want to have each page act as the first page of a linked set of related pages. It doesn't have to be fancy - it can just have a link "Next Page ->" on the bottom of the first page, "<- Prev Page" on the bottom left of the last page, and both at the bottom of all intervening pages. What I don't want to do is to modify the basic page template (page.php?) and find all three paged topics in one sequence. I can easily hand-code the links in each page, but that requires constant maintenance.

    What I want to know is if I can clone off three separate copies of the default page template, one for each category, and then implement your Next/Previous Page Link Plus in each different page template, and have each implementation work only for that particular custom page template? Would any code changes be required in your own code?

    Any code examples of such a solution would be appreciated.

    Best regards,

    Beartooth
    beartooth@leftbankblog.org

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

  2. ambrosite
    Member
    Plugin Author

    Posted 1 year ago #

    There are two ways you could solve this:

    1) Create three separate page templates as you suggest, and use the in_pages parameter to specify the page IDs that should be included in the sequence. The downside to this is that you would have to edit the templates every time you create a new page and add the ID.

    2) Create only one page template and use the in_same_meta parameter. Create a custom field on each page to specify which category it belongs to. That way, you never need to edit the page template again; just make sure to add the custom field whenever you add a new page.

    Either way, you will have to set order_by to 'menu_order' and use a plugin like Post Types Order to set the page sorting order.

  3. ambrosite
    Member
    Plugin Author

    Posted 1 year ago #

    Since I have not heard back from you in over a week, I am assuming that one of my proposed solutions worked for you, therefore I am marking this thread as resolved. If you have any more questions about the plugin, feel free to start a new thread.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.