Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a one column page for the home page where I have a mega menu and in side the site there is another page called about us where the mega menu is present but it is in small format just like it differs from the mega menu in width and height.So for home page I have used widget and now for about us page I want the small mega menu.So can any one tell me how to do that.I heared about if(front_page()), so I am using this but nothing is happening.So please guide me.Thanks in advance.

share|improve this question
    
have you read: codex.wordpress.org/Conditional_Tags –  Michael Jun 24 '11 at 22:14
    
"So can any one tell me how to do that" - Do what? What was the question? –  alexndm Jun 24 '11 at 22:47

1 Answer 1

up vote 0 down vote accepted

you can use this,

<?php if( is_front_page() ):?>
<div class="home-page-menu">
 wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );
</div>
<?php elseif; ?>
<div class="inside-page-menu">
 wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );
</div>
<?php endif; ?>

Here, you should be change your CSS style for home-page-menu and inside-page-menu . for more details about this is_front_page() follow this link http://codex.wordpress.org/Function_Reference/is_front_page

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.