lukkas — 2013-09-10T21:13:50-04:00 — #1
I am using wordpress 3.3 and need the home page horizontal menu to a specific way while ALL the interior pages have a more involved drop down menu.
So, one menu for home page and all other pages get a detailed menu/
<?php include_header(); ?>
<?php mainmenu(); ?>
how can I make it detect if it is homepage to use mainmenu, and if not to use a secondmenu for all other pages?
I am not a programmer, more of a stylist.
michael_morris1 — 2013-09-10T23:19:20-04:00 — #2
Set the homepage to use its own template in the admin panel. As your design evolves you are likely to come up with other differences between the two layouts, so separating the templates now will be easier than later.
Also, we have a Wordpress specific forum. This one is for general PHP questions.
lukkas — 2013-09-10T23:33:44-04:00 — #3
In the theme editor area? the home.php or index.php they both have <?php get_header(); ?>
so you would simply edit it to get_headerhome(); ?> and make a headerhome.php file ?
we can move this question to wordpress if necessary.
snecz — 2013-09-11T03:44:42-04:00 — #4
One possible way is to make two headers and different template for home page.
So you can have header.php and header-home.php.
Than for home page template you can call <?php get_header('home'); ?> and for page.php just <?php get_header(''); ?>.
Hope that helps.
ralphm — 2013-09-11T04:21:51-04:00 — #5
I would question the wisdom of having a different menu on different parts of the site. Sounds confusing to me.
lukkas — 2013-09-12T16:12:25-04:00 — #6
I want it to be hierachical. Instead of bloating the homepage with a full menu. it is menu "a" (no dropdown) and ALL pages inside the site get menu "b" (which has dropdown)