Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   removing category menu in wp 3.0 (http://forum.bytesforall.com/showthread.php?t=9493)

alnitak Sep 8, 2010 07:00 AM

removing category menu in wp 3.0
 
Greetings,

It looks like one could edit the bfa_header_functions.php file to check if is_home() and display the category menu (menu 2) from the wordpress menu only if the page is the home page. I'm no php coder, so I can't seem to make it work. Anyone out there care to show me how to code this?

Pete

juggledad Sep 8, 2010 07:08 AM

If you don't want the menu, just remove %cats from the header configuration option

alnitak Sep 8, 2010 02:12 PM

What if I'm using the wp 3.0 menu system?

lmilesw Sep 8, 2010 04:00 PM

Can you please clarify what you are trying to do.

Do you want no category menu or only have a category menu on the home page? If you are using the WP 3 menu are you going to use two separate menus or combine categories and pages on the same menu?

alnitak Sep 8, 2010 08:53 PM

Larry,

Using the WP 3.0 category menu, that I've set up as menu 2 in the menu tab of the administrator, I want to display that menu only on the blog page of the site. I have a static homepage, with the blog page set as the "homepage" for posts. It seems to me that I could include a conditional statement using if (is_homepage) to display the menu only on that "homepage". Exactly which statement paints the menu in the bha_header_functions.php file? If I knew that, I could then test is_homepage before executing the command to display menu 2.

Does that clarify what I am trying to do?

Cheers,

Pete

lmilesw Sep 8, 2010 09:43 PM

Try using the following instead of just %cats
HTML Code:

<?php if( is_home() ) { ?>
%cats
<?php } else { ?>
<?php } ?>


alnitak Sep 9, 2010 08:58 AM

Larry,

Perfect! You da man.

Pete

lmilesw Sep 9, 2010 09:02 AM

Also you don't really need the <?php } else { ?> in this case so the code could be just
HTML Code:

<?php if( is_home() ) { ?>
%cats
<?php } ?>



All times are GMT -6. The time now is 09:56 AM.

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