612-293-8629 HELLO@THEMIGHTYMO.COM

I just realized that they added some sweet features to the wp_list_pages() funtion in WordPress 2.7. These include the ability to add html before and after menu items.

I was struggling earlier today, trying to squeeze graphic dividers between dynamically-created between menu items. After trying all sorts of CSS tricks, I discovered this simple workaround included in WordPress since 2.7.

The basic code to add an image after each menu item looks like this:

<?php wp_list_pages(‘link_after=<img src=”http://mydomain.com/myImage.gif”‘); ?>

ALSO, as a bonus, I also discovered the brand new (since 2.7) function, wp_page_menu(), which is similar to the aforementioned wp_list_pages function, except that this one is specially-designed to allow us to add the “home” page to the menu. My guess is that the new wp_page_menu() function will eventually replace wp_list_pages().

Enjoy!

PHONE, EMAIL, TEXT

We love to communicate: phone, email, text, Facebook, Twitter, LinkedIn, you name it.

LOCATIONS

PAYMENTS ACCEPTED

Call Now

Enroll in Our Free Beginner WordPress Class - delivered to your Email Inbox!

Become a WordPress superstar for FREE in only minutes a day!  Our free Beginner WordPress Email Class will be delivered to your inbox!

Learn More 

You Have Successfully Enrolled! Prepare For Amazing!