nice to saw a web blog of a wordpress web designer :)
A Wordpress Menu Solution
Note: This post is over a year and a half old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
I love using the wp_list_pages function to pull in the pages on a Wordpress site to create menus, but I sometimes get frustrated that I can’t assign individual CSS classes to each menu item. But I enjoy a challenge. Here’s my solution.
http://pastie.textmate.org/22226
It’s basically a preg_replace in PHP that looks for all of the page_item li classes and matches the titles of the links in the lines. The function replaces ‘page_item’ with the title of the link for that page. If you want to see it in action go to the Circle Six Design Homepage and check out the main menu. I haven’t quite decided what I’m going to do with all of the styling possibilities yet, but at least I’ve solved the first problem ;-). 
-
11.13.06 / 4am
Comments are closed
Comments are currently closed on this entry.