Posts in drop down menu?
-
How do I ad post and categories in the drop down menu? I get only pages.
-
Use the template tag, wp_dropdown_categories(), for categories.
Also look at the wp_get_archives() article for a dropdown example, and this article addresses dropdown also (read some of the comments also):
http://www.problogdesign.com/quick-tweaks/dropdown-the-monthly-archives/Note: with wp_get_archives you would want to use the type=postbypost parameter
Hi
I wasn´t thinking of a dropdown box, I was thinking of the horisontal menu on top of the page.Then using the technology you use for pages, use wp_list_categories, and wp_get_archives.
http://www.liewcf.com/blog/archives/2005/05/wordpress-navigation-bar/
http://www.google.com/search?q=wordpress+categories+in+nav+baNot sure if it applies, but look at Creating_Horizontal_Menus and the More Information on Horizontal Menus section of that article.
Tansk, I´ll look into this.
In my case I want to combine both post and pages in the top menu.
(menu with sub menu) It look like I have to hard code the meader.php, right?Yes to header.php if that’s where the nav is displayed.
If you don’t want to hard code there is a plugin which can help with this: “Page Links To” (by Mark Jaquith). Using that you could set up a page, which will appear in your navigation menu, but make it direct automatically to your post or category. I find it a really helpful plugin; but you may not want to rely on a plugin for this.
MichaelH, thanks. I´ll will turn the question around, and put it like this. How can I only list some of the pages? I am using <?php wp_list_pages(‘title_li=’); ?> This one lists it all. What do I do to list some of the pages?
..paul, thanks. I´m using WP 2,7, the plug in supports only 2,6.
working for me on 2.7
thanks
…paul, the plug-in made it!
The topic ‘Posts in drop down menu?’ is closed to new replies.