![]() |
[SOLVED] Removing the menu from a single page
Can someone tell me if it is possible to remove the menu from one single static page. I still want it to show up on all the other pages though. Is this possible?
|
add the following to the CSS insserts (where you use your page ID)
HTML Code:
body.page-id-3 #menu1 {display: none;} |
Could you explain this more clearly? I also want to not show a menu on certain pages.
I have a custom menu and under that, the Atahualpa Category menu.I'd like to remove both. I didn't understand this that you wrote: "add the following to the CSS insserts (where you use your page ID)" I've also seen suggestions to create a page template, but in page.php, I don't see any mention of the menu, so I can't remove it. Here's the code: get_header(); ?> <div id="content" class="narrowcolumn" role="main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> </div> <?php get_footer(); ?> Thanks, Ellen |
Each page has a page I'd (do a google search with 'how to find wordpress page id' you will find better explanations that I could give
|
You put that code in the CSS Inserts box in the theme options and replace the example id with your actual page id. The way I find the id is look at the page source and search for [body class] without the brackets. That should take you to a line that looks like the following.
HTML Code:
<body class="page page-id-2204 page-template page-template-blog-php logged-in custom-background"> HTML Code:
body.page-id-2204 To find the selectors for the menus you want to hide I use Firebug. |
It worked! Thanks to both of you.
I knew how to find the page ID, that wasn't the problem. Easier than your methods -- display all pages, hover over the page and look at the text at the bottom-left corner of the browser's status bar -- the number will be in the code. What I didn't know was where the CSS Inserts box was. Now I know it's at ATO>Various Content Items> Add HTML/CSS Inserts. The menus were easy, just menu 1 and 2. |
All times are GMT -6. The time now is 02:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.