Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi KTS,

    It would be possible by hacking the plugin to only include using the is_user_logged_in() function.

    I’m not sure if there is a plug-in that only includes specific plug-ns when logged in or not that you could use instead, however I can add this feature to the development list if you wish.

    Many thanks

    Peter

    Thread Starter KTS915

    (@kts915)

    Peter,

    Thank you. It seems our minds have been working in a similar fashion. Last night I searched for a plugin that could control the behavior of other plugins, but didn’t find anything.

    I also wondered about the is_user_logged_in() function, and whether I could tweak the plugin by adding a function in my functions.php file, but couldn’t find a way to do that.

    What I have now found is a CSS fix. I would never have thought that CSS could do this, but apparently it can. I have just tried putting this within an appropriate media query, and it seems to do the job:

    #click-menu { display: none; }
    body.logged-in #click-menu { display: block; }

    Of course, this still leaves the menu “there,” just not visible. That’s probably good enough for me — unless you are going to tell me that there’s something bad about this method.

    Hi KTS,

    I just took a look at this and you are correct this works and it is not visible however the best way would to be to remove it completely so people that know what they are doing can’t access it.

    I have just tested the following which you can add to your functions.php file in your theme and will only include the menu when a user is logged in:

    if( !is_user_logged_in() ) {
        remove_action( 'wp_footer', array( 'ResponsiveMenu', 'displayMenuHtml' ) );
    }

    This is probably the best option as it means that the HTML itself is not included at all so can’t be accessed.

    Please let me know if this works for you and if you experience any issues with this.

    Many thanks

    Peter

    Thread Starter KTS915

    (@kts915)

    Peter,

    Your solution works very well. Thank you!

    Hi KTS,

    Great news and glad I could help!

    Many thanks

    Peter

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Logged In Users Only?’ is closed to new replies.