Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Lap

    (@lapzor)

    Hi, you can use PHP code to hide or show the bar on certain pages, for example the following code will show the topbar only on the homepage:

    add_filter( ‘mctb_show_bar’, function( $show ) {
    return is_home();
    } );

    If that doesn’t work for you you probably need this:

    add_filter( ‘mctb_show_bar’, function( $show ) {
    return is_front_page();
    } );

    https://kb.mc4wp.com/adding-code-to-to-your-website/

    Hope that helps. If you have any questions, please let us know!

    I’ve tried both of these and it doesn’t work for me.
    I’m using a child theme and have placed the code in the child theme’s functions.php file.
    Is that correct?

    Hello,

    I tried this also, although I thought it might go in the Custom CSS area. Please clarify where the text should be placed in order to work across the site.

    many thanks,

    • This reply was modified 6 years, 1 month ago by longjohn1. Reason: notification email
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide Top Bar on specific pages’ is closed to new replies.