Jump to content
Sign in to follow this  
stijnxo

recall different menu,s

Recommended Posts

stijnxo

Hi I hope you can help me out here. I'm currently developing a website with four (or more) different sites within. We start with a splash page and from there we want to go to our Pageline (wordpress) site.(4 choices) But depending on the choice that was made in the splashpage we want different menu's... We already created 4 different menu's within WP-pagelines. Now i'm looking for a way to recall wordpress with the specific menu for the choice made on the splash page. This would be great becuse else we would have to develop 4 sites, but some parts of the sites are the same. so much easier if we can use just one version of wordpress instead of four. I hope this is clear to you all and thanks in advance. regards Mike

Share this post


Link to post
Share on other sites
cmunns

I think what I would do is create a custom code hook so that based on the initial starting page you only display a certain menu, but if you've created 4 menus and want them all in the same area. So for example open up your PlatformBase functions.php file (using the PlatformBase child theme here) and add this type of code ` add_action ('pagelines_after_branding','four_menus'); function four_menus(){ if(function_exists('wp_nav_menu') && is_page('id of page 1')){ wp_nav_menu( array('menu' => 'Nav Name1', 'menu_class' => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'theme_location'=>'primary') ); } elseif(function_exists('wp_nav_menu') && is_page('id of page 2')){ wp_nav_menu( array('menu' => 'Nav Name2', 'menu_class' => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'theme_location'=>'primary') ); } elseif(function_exists('wp_nav_menu') && is_page('id of page 3')){ wp_nav_menu( array('menu' => 'Nav Name3', 'menu_class' => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'theme_location'=>'primary') ); } else(function_exists('wp_nav_menu') && is_page('id of page 4')){ wp_nav_menu( array('menu' => 'Nav Name4', 'menu_class' => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'theme_location'=>'primary') ); } `

Share this post


Link to post
Share on other sites
stijnxo

Thansk for the reply , i'll try this out, keep you posted...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×