Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #700411

    I am trying to hide the admin bar in an iframe using negative separator and z-index. I got the spacing right but not 100% of the element above it is covering the admin bar.

    • This topic was modified 8 years, 1 month ago by Overhaulics.
    #701014

    Hi Kyle,

    I’m not sure I understand what you are trying to do there, could you try to explain a bit further and/or post a screenshot highlighting your intentions please?

    Regards,
    Rikard

    #701024

    Attached a short video. Hard to explain without just seeing it.

    #701954

    Hi,

    Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:

    #onbottom {
        z-index: 99;
    }
    

    Best regards,
    Yigit

    #702113

    That ends up showing the full admin bar instead of hiding it. I want none of the second admin bar showing. So the color section #ontop needs to be going over the grid section #onbottom.

    #702243

    Hi,

    Thanks for the feedback, please something like this instead:

    #top #wpadminbar {
    display:none !important; 
    }

    Regards,
    Rikard

    #702675

    Again, not quite right as it removed the main admin bar I wanted and not the secondary one. But I did find a solution!

    In the functions.php file for my child theme I input:

    function my_theme_hide_admin_bar($bool) {
    if ( is_page( 677 ) ) :
    return false;
    else :
    return $bool;
    endif;
    }
    add_filter(‘show_admin_bar’, ‘my_theme_hide_admin_bar’);

    This hides the admin bar on page id of 672 which was the page loading in the iframe.

    #702777

    Hi,

    Great, glad you came up with a solution and thanks for sharing, much appreciated :-)

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.