Website Design Orlando

Responsive-Mobile design by Irina Blumenfeld

  • About
  • Services
    • Website Design
    • Local SEO
    • Digital Marketing
    • Website Care
  • Projects
  • Testimonials
  • Articles
    • Speaking
    • Tutorials
    • Resources
  • Support
  • Contact
  • Twitter
Home / Tutorials / Add previous/next links on single page of custom post type in Genesis

Add previous/next links on single page of custom post type in Genesis

Updated: February 8, 2019 //

Previous Next links on single pages of custom post type

If you have a custom post type (for example – Portfolio), you might want to add Previous and Next buttons under each portfolio piece.
Here’s an example of that on this website: Single Porfolio piece. Notice at the bottom Previous and Next links go to other single pages of custom post type – Portfolio.

You need to add this code to your functions.php file (this example uses ‘portfolio’ custom post type, but you can change it to your custom post type):

Gist – Previous/Next Post Navigation in Genesis:

If you want to style your links, you can add this in your styles.css:

Gist – Style Previous/Next Post Navigation

4.6/5 (7 Reviews)

Recent Posts

WordCamp Orlando 2019

WordCamp Orlando 2019

WordCamp Orlando 2019 was held at the UCF Rosen College of Hospitality Management. WordCamp is an annual conference that focuses on everything WordPress, organized by[Read More…]

Display custom post types in a widget

How to add custom post types to a Widget

Recently I was working on adding Custom Post Type – Portfolio in a widget on Home page. An example of that would be Portfolio display[Read More…]

speed up your website

WordCamp Orlando 2016

I was happy to speak at WordCamp Orlando. This event was held on November 12-13, 2016 at the UCF Rosen College of Hospitality Management. We[Read More…]

About Irina Blumenfeld

Web Consultant, empowering business owners through WordPress. Passionate about Web Performance.
Follow on Twitter

Comments

  1. Becca says

    April 18, 2016 at 12:13 pm

    Thank you for this! Exactly what I was looking for. I have one little problem: The next arrow actually goes to the previous page (and visa versa). I know nothing about PHP, is this an easy fix?

    • Irina Blumenfeld says

      April 18, 2016 at 1:05 pm

      I updated the code to display actual post titles for Next/Previous links (just like on this website for Portfolio and Testimonials custom post types). Hope this fixes it.

  2. Victor says

    May 30, 2016 at 9:51 am

    Hi Irina, thank you for the article!
    But I can’t seem to make it work.
    I have a custom post type named cases, so I changed the code to “is_singular( ‘cases’ )”
    but it didn’t work, is there something else I need to do?

    • Irina Blumenfeld says

      May 30, 2016 at 9:31 pm

      Hi Victor,
      It should work if you replace ‘portfolio’ with ‘cases’, if that’s your custom post type. Check to see if your singular_name is ‘cases’ or ‘case’ where you registered your custom post type. If it’s ‘case’, then make sure to put “is_singular(‘case’)”. It might also not work if there is a syntax error somewhere. If you’re using a text editor, like Sublime Text 3, it will show you any syntax errors.
      Hope this helps

  3. Susan Kitchens says

    May 20, 2019 at 11:26 pm

    This. was. perfect. Thank you so much. I’ll get around to styling it, but for now, individual entries in my custom field type, with this snippet used via the code snippets plugin was a gloriously painless implementation.

Categories

  • Resources (5)
  • Speaking (14)
  • Tutorials (17)

More Articles

  • WordCamp Orlando 2019
  • Stand Out In Search Results
  • How To Make Your Site Stand Out In Search Results
  • Speeding Up WordPress
  • WordCamp Jacksonville 2018
  • WordPress Orlando Gutenberg Meetup
  • WordCamp Miami 2018
  • Steps to do before launching a WordPress website
  • 10 Steps To Do Before Launching Your WordPress Website
  • Why is my WiFi so Slow? Best ways to Fix Slow WiFi at home
  • WordCamp Orlando 2017
  • How to hide author username in Beaver Builder Posts Module
  • How to fix slow loading images
  • Best Practices For Faster Websites
  • Plugins
  • WordCamp Orlando 2016
  • How to add star rating in WordPress
  • Make WordPress website faster in 3 steps
  • Migrate WordPress to HTTPS
  • Why you should migrate to HTTPS
  • WordCamp Jacksonville 2016
  • How to disable Emojis in WordPress
  • WordCamp Miami 2016
  • How to remove query strings from static resources
  • How to enable Free SSL, HTTP/2 protocol and CDN
  • Improve Your Website Performance
  • List of resources to speed up your website
  • 10 ways to speed up your website
  • Benefits of HTTP/2 Protocol
  • How to add custom post types to a Widget
  • Add previous/next links on single page of custom post type in Genesis
  • How to add text “Menu” next to Hamburger Icon
  • About
  • Services
  • Projects
  • Testimonials
  • Articles
  • Support
  • Contact
  • Twitter

Copyright © 2021 · Netmagik.com · All Rights Reserved · Privacy Policy · Disclosure · Sitemap
WordPress hosting by SiteGround
Tools We Recommend

Twitter Facebook Linked In Github Codepen