Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor responsivemenu

    (@responsivemenu)

    Hey there,

    Unfortunately thats not possible as there is no WordPress hook to check if a menu is empty or not but you can easily use the shortcode and only show the menu when a user is logged in.

    There are instructions on how to do this below:

    https://responsive.menu/docs/advanced-setup/shortcode/

    All the best

    Thread Starter CBServices

    (@cbservices)

    I can use:

    if ( is_user_logged_in() ) {
    }

    in my template files, all i need to know what classes I need to hide to hide the menu for people not logged in (empty then).

    Plugin Contributor responsivemenu

    (@responsivemenu)

    Hi there,

    I think you have misunderstood it slightly, please look at the example on the documentation page. I have copied it below for convenience:

    if(is_user_logged_in())
         echo do_shortcode('[responsive_menu]');

    There is no need for any classes – it will simply show or hide the menu if someone is logged in or not.

    Thread Starter CBServices

    (@cbservices)

    Ohhh, I understand now…
    You are awesome! Really!

    Plugin Contributor responsivemenu

    (@responsivemenu)

    Hey,

    No problem – I’m just glad it worked for you!

    Enjoy!

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

The topic ‘Hide when empty’ is closed to new replies.