Using CSS Sliding Doors with WordPress Navigation

July 1, 2008

This sliding doors CSS hack allows you to create sophisticated tabs for your navigation bar. Sadly, WordPress core functions wp_list_pages() and wp_list_categories() don’t allow you to add the required span tag to use this technique. We are going to see how to proceed in order to use sliding doors in our WordPress theme. Sliding doors, why? There’s many articles available on the web about the sliding doors technique, so I’m not going to talk a lot about it. For people who don’t already know this famous hack, here’s... [Read the full story]

Using the sliding doors hack within WordPress

July 1, 2008

Let’s use a regular expression, by using the php preg_replace() function. We are going to get our pages (or categories) without displaying it, and passing it as a parameter to preg_replace(). The two remaining parameters will be, of course, our regular expression: The pattern we’re looking for, and this pattern’s replacement. To create this menu, paste the following code instead of the wp_list_pages() (or wp_list_categories()) function in the header.php of your WordPress theme. To list your pages: <ul id="nav"> <li><a... [Read the full story]