Custom Menus for Custom Post Types

Community Forums Forums General Discussion Custom Menus for Custom Post Types

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  billerickson 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #52422

    markr
    Participant
    Post count: 2

    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/
    #53659

    billerickson
    Participant
    Post count: 16

    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’ );

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.