Hi All Is there a plugin that will hide the menu on just one page? I am using the twenty nineteen theme. Thanks Alan
.page-id-17832 #top-menu-nav {
display: none;
}
I tried to add this using the code snippets plugin, but something seems to be wrong
You have a couple of things going on.
First, you are targeting a non-existent element id. There is no element with an id called #top-menu-nav on that page. The menu id is #site-navigation.
Second, I would use a PHP script to inject the CSS on the page rather than loading it on every page.
This is how I would write the script:
if ( is_page( '17832' ) {
add_action('wp_head', 'hide_top_navigation';
}
function hide_top_navigation() {
echo PHP_EOL . "<style>
#site-navigation { display: none;};
</style>" . PHP_EOL;
}
Thanks. I am going to paste that into the plugin called code snippets
I didn't test the code. It may need some tweaking. Let me know if it works.
Please login or Register to submit your answer
Staff replied 3 years ago
Which menu? There are many
replied 3 years ago
on one page piratedivebar.com/dog the top menu