Add Next & Previous Navigation Links To Entries In Same CPT Taxonomy Type

This code enables you to add next & previous links to single CPT’s in the same term.

Example : If you create a custom posy type named Portfolio and additionally create custom Portfolio taxonomy types named America, United Kingdom, Australia & Japan, the navigation will only link entries within each taxonomy type and exclude portfolio entries for other taxonomy types which you can view by watching the following demo video.

Video Demo

The video shows previous and next links added to portfolio taxonomy type entries for America, Australia and Japan.

You can use this code with custom taxonomy types and when using categories and tags with your CPT.

Register or login to access the code for members :


Comments

3 responses to “Add Next & Previous Navigation Links To Entries In Same CPT Taxonomy Type”

  1. Randall Roden Avatar
    Randall Roden

    Got the links to custom taxonomy types working. THANKS!

    Unfortunately when I visit the portfolio page “http://rroden.com/portfolio/” that displays the combined photography, drawing and pottery categories, the links at the bottom of each portfolio page only lets me go to the next portfolio within that custom taxonomy. e.g. I should be able to go from Lotus Blossoms (photography) to the 9 1/2″ Bowl (pottery), but the link goes to the next photo.

    If you you covered this in a previous post Brad, please redirect me.

    1. Brad Dalton Avatar
      Brad Dalton

      Please check the other tutorials in this archive. You can modify the parameters for previous_post_link. I’ll be back on the 6th.

    2. Brad Dalton Avatar
      Brad Dalton

      Randall. Did you find a answer to this?

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.