Simple Conditional Logic won't work

Community Forums Forums General Discussion Simple Conditional Logic won't work

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  coralseait 6 months, 2 weeks ago.

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

    aranya
    Participant
    Post count: 14

    In the following code I’m always getting the “else” option and I can’t figure out why:


    if ( is_single() ) {
    add_theme_support( 'genesis-menus', array( 'primary' => __( 'Primary Navigation Menu', 'genesis' ) ) );
    } else {
    add_theme_support( 'genesis-menus', array( 'secondary' => __( 'Secondary Navigation Menu', 'genesis' ) ) );
    }

    Any idea why I always get the “else”?

    #66332

    coralseait
    Participant
    Post count: 85

    Hello,

    is_single() must not be returning true. You can display what it is returning and go from there.

    Cheers!


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

You must be logged in to reply to this topic.