• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Custom Post Types and genesis_prev_next_post_nav

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Custom Post Types and genesis_prev_next_post_nav

This topic is: resolved

Tagged: custom post types, post navigation

  • This topic has 1 reply, 1 voice, and was last updated 10 years ago by claycomix.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 4, 2016 at 7:32 pm #175603
    claycomix
    Member

    Hello,

    I have a problem and I have looked everywhere but I can't seem to find an answer.

    I have used the code from http://my.studiopress.com/snippets/entry-content/#add-post-navigation to add post navigation to my site, and it works as expected with posts.

    However, it doesn't show up with custom post types. It worked with the previous theme I was using (twenty fifteen) but not with Genesis.

    Any help would be greatly appreciated.

    Best regards
    Clay

    January 4, 2016 at 8:23 pm #175606
    claycomix
    Member

    Figured it out. May not be the most elegant, but I found the code that handles genesis_prev_next_post_nav from here:

    http://genesis.wp-a2z.org/oik_api/genesis_prev_next_post_nav/

    Copy/pasted the code into the child theme functions.php calling it my_genesis_prev_next_post_nav

    changed the line

    if ( ! is_singular( 'post' ) )

    to

    if ( ! is_singular (array ( 'post' , 'custom_post_type1', 'custom_post_type2' ) ) )

    and hooked it in as on http://my.studiopress.com/snippets/entry-content/#add-post-navigation and it works like a charm. I'm very glad I worked it out for myself but if anyone knows a more elegant solution, I'd like to know!

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble