Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   [SOLVED] Removing the menu from a single page (http://forum.bytesforall.com/showthread.php?t=11334)

Thwacky Nov 23, 2010 01:30 AM

[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?

juggledad Nov 23, 2010 05:12 AM

add the following to the CSS insserts (where you use your page ID)
HTML Code:

body.page-id-3 #menu1 {display: none;}

ellenfinkl Dec 13, 2012 02:43 PM

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 &raquo;</p>'); ?>

<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

<?php get_footer(); ?>


juggledad Dec 13, 2012 08:24 PM

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

lmilesw Dec 14, 2012 07:14 AM

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">
In this case you would use
HTML Code:

as your selector
To find the selectors for the menus you want to hide I use Firebug.

ellenfinkl Dec 14, 2012 03:19 PM

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 11:48 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.