[wp-hackers] no 'before' or 'after' parameters for wp_list_pages()?

Ghodmode ghodmode at ghodmode.com
Mon Nov 30 08:36:16 UTC 2009

On Mon, 2009-11-30 at 18:42 +1300, Ghodmode wrote:
> I'm using both wp_list_bookmarks() and wp_list_pages() in my theme to
> generate a horizontal menu bar in the header.  I prefer not to use HTML
> lists (li) elements, so I use the 'before=' and 'after=' parameters for
> my call to wp_list_bookmarks(), but there's no equivalent parameter for
> the wp_list_pages() function.

I was reinventing the wheel here.  wp_page_menu()
(http://codex.wordpress.org/Template_Tags/wp_page_menu ) is designed to
do what I want.  This generates a DIV which contains an unordered list
where each list item contains a link.

-- Kinda Off Topic ...
Doesn't the default unordered list go against the concept of separating
data from presentation and semantic representation?  I know that a UL is
a popular way to represent a menu, but a menu is, semantically, a
different part of a document than the traditional meaning of the word
"list".  For example, a list of my favorite movies isn't equivalent to
the menu.  The menu is an index of the entire site's content, not
actually part of the current document.

Anyway, that's a debate for a different list :)

Thank you.


More information about the wp-hackers mailing list