• Resolved Daniel Fuchs

    (@dfuchs72)


    Hi, I’ve already received some great support via email but would like to post some suggestions for future development here which might interest other people as well. The first one is:

    Could you add the ability to add venue pages to menus via the WordPress menu editor? At the moment, this only seems possible for event categories and tags.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Craig Schlegel

    (@craigmschlegel)

    Hi Daniel,

    Thanks for reaching out here!

    I suppose hiding the venue and organizer post types from nav menus was originally to just follow the same patterm used for events. The goal of which was to not overwhelm the nave menu list with a ton of event posts. This probably isn’t a concern as most sites will not have a large number of venues and organizers. It might be changed in the future.

    For now, can you add a PHP snippet to expose them:

    /**
    * Add WP Event Genius venues and organizers to Appearance → Menus.
    */
    add_filter( 'register_post_type_args', function ( $args, $post_type ) {
    $evge_menu_post_types = array( 'evge_venue', 'evge_organizer' );

    if ( ! in_array( $post_type, $evge_menu_post_types, true ) ) {
    return $args;
    }

    $args['show_in_nav_menus'] = true;
    $args['archive_in_nav_menus'] = true;

    return $args;
    }, 10, 2 );

    Remove the ‘evge_organizer’ part if you just want venues.

    This can be added to your theme’s functions.php file or you can use a code snippet manager like WP Code.

    Let me know if you need more help!

    – Craig

    Thread Starter Daniel Fuchs

    (@dfuchs72)

    Thank you Craig, that was what I needed.

    I think it wouldn’t make sense to add events to a static menu, and I don’t use organizers, but pages for venues totally make sense to me. More so than category and tag archives.

    Plugin Support Craig Schlegel

    (@craigmschlegel)

    Yes that is a fair point. A note has been made for a future release to revisit this!

    Glad that worked for you!

    – Craig

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.