• 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 Menus for Custom Post Types

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 Menus for Custom Post Types

This topic is: not resolved

Tagged: custom post types, genesis media project, Genesis Simple Menus

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 2 months ago by billerickson.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 25, 2013 at 3:00 am #52422
    markr
    Member

    Hello All,

    Am using the Genesis Simple Menus plugin. Works great for everything EXCEPT custom post types, specifically Nick Croft's "Video" post type in his Genesis Media Project plugin. Even works for Video Tags and Video Categories pages, but not for the Video posts themselves. The dropdown to select an alternate menu does not appear.

    How can I code this into the functions.php file? I already am swapping header graphics via CSS based upon page/post/category/etc....so now I would like to specify the menu selection based upon the same conditionals. Here's what I have:

    `add_filter( 'body_class', 'add_body_class' );
    function add_body_class( $classes ) {
    if ( is_page(array(544,632,165,451,713,826,831)) || is_tax( 'video', 'off-road') || is_category( 'offroad' ) || is_single( array(227,647,665,676,520,697,709,716,722))) {
    $classes[] = 'page-id-544'; }

    else if ( is_page(array(546,750,753,763,764,865)) || is_category( 'car-collectors' ) || is_single( array(861,863))) {
    $classes[] = 'page-id-546';
    }`

    (...more else if's follow...)
    What I would like to do is to add an assignment into each if/elseif....that would assign the appropriate menu into the subnav menu (secondary menu?) just as the GSM plugin does elsewhere (everywhere but the Video taxonomy).

    Thanks in advance. I have tried all types of syntax, but getting nowhere. Basically, I have partitioned the website into four main sections, each of which gets its own header and own subnavigation menu.

    http://racerschannel.tv/video/king-of-the-hammers-2012-highlights/
    August 1, 2013 at 8:11 pm #53659
    billerickson
    Member

    Are you trying to add the Genesis Simple Menus metabox to the Edit Videos screen? Add this to your theme's functions.php file:

    add_post_type_support( 'video', 'genesis-simple-menus' );

  • 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