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.
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
Attached a short video. Hard to explain without just seeing it.
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
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.
Hi,
Thanks for the feedback, please something like this instead:
#top #wpadminbar {
display:none !important;
}
Regards,
Rikard
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.