Pleas, help me
-
hi
please i want to customize my header just like this one:
http://img20.imageshack.us/img20/6967/28121.jpg
put the categories, and on clic the sub categories apears
is ther any tutorials?
thank you
-
It’s pretty easy.
For the main menu, use:
<ul id="nav"> <?php wp_list_pages('title_li=&depth=1&sort_column=menu_order'); ?> </ul>Then for the submenus, use:
<?php global $post; // if outside the loop if(is_page()): $children = wp_list_pages('echo=0&title_li=&sort_column=menu_order&child_of='.$post->ID); if(!$children && $post->post_parent) $children = wp_list_pages('echo=0&title_li=&sort_column=menu_order&child_of='.$post->post_parent); if($children) { echo ('<ul id="submenu">'); echo $children; echo ('</ul><br />'); } endif; ?>You can then use CSS to style the menus as you want.
hi stiand
thanx for your reply
could you please tell me where i have to put thatLook for
wp_list_pagesin your theme files. If you provide a link it would be easier.this is my example: http://www.grafpedia.com/
+
i think that its wp_list_categoryes; because i want to put the categories in the header
thank youplease, i need it
Try using my example, and exchange
wp_list_pagesforwp_list_categories. Haven’t tried it, but they use the same arguments, so it should work in theory.
The topic ‘Pleas, help me’ is closed to new replies.