pictures

jappler menus in wordpress.

hr
hr

Awhile back, I put something together (sons of suckerfish and sliding doors) and then was recently asked how to get this to work dynamically in WordPress.

The key to getting this to work dynamically is to first choose how you want to organize your site. I have done numerous sites based on categories and a lot also done using pages. Once you figure out what you want your menus to be driven from (page hierarchy or category hierarchy) you can then use some built in WordPress functions to dynamically fill out your menus.

For categories: you will want to use the wp_list_categories function
Example: (using the CSS and JS from the article I posted previously)

PHP:
<div id="nav">
<ul>
<?php wp_list_categories('exclude=4,7&title_li='); ?>
</ul>
</div>

With that example, you can exclude certain categories, and their will not be a "Categories" text as the first level of the list. For more options, check out the wp_list_categories documentation.

For categories: you will want to use the wp_list_pages function
Example: (using the CSS and JS from the article I posted previously)

PHP:
<div id="nav">
<ul>
<?php wp_list_pages('exclude=4,7&title_li='); ?>
</ul>
</div>

With that example, you can exclude certain pages, and their will not be a "Pages" text as the first level of the list. For more options, check out the wp_list_pages documentation.

There is also another option (plugins) I have used that extends both of those functions: Fold Category List, Fold Page List.

hr

Related Posts

Comments, Pingbacks and Tracebacks

(Comment icons use gravatars. Sign up for a gravatar so you can be cool too.)

One Response to “jappler menus in wordpress.”

  1. [...] A simple example: Check this code out in action (reusing the tabs I created from the jappler menus). [...]


hr

Leave a Reply


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts

  1. using parallels and windows for web development debugging.
  2. remove all .svn directories in a directory.
  3. wordpress newsletter plugin.
  4. php live training.
  5. jappler recommends: room & board (store).
  6. another good first tuesday in november.
  7. so long, farewell ben!
  8. feel better soon joe paterno.
  9. css containers: one image, fixed width, rounded corners.
  10. outlook users having issues with mail.app attachments.

blog archive

standards

Get Firefox!
XHTML
CSS