[wp-hackers] Why does wp_page_menu exist?

Aaron Brazell emmensetech at gmail.com
Wed Feb 4 22:12:51 GMT 2009

On Wed, Feb 4, 2009 at 3:00 PM, Dan Gayle <dangayle at gmail.com> wrote:

> Why does wp_page_menu exist? The functionality is LESS than wp_list_pages.
> For example, what if one doesn't want to have sub-pages listed? You can't if
> you choose to use wp_page_menu. In fact, it provides half of the
> functionality of wp_list_pages, while only allowing the additional use of
> adding a link to the home page, which is easily done like this:
> <ul id="navigation">
>        <li><a href="<?php echo get_option('home'); ?>" rtitle="<?php
> bloginfo('name'); ?> Home Page">Home</a></li>
>        <?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
> </ul>
> So what was the reasoning behind adding a totally new function, when simply
> adding an additional option to wp_list_pages would have done the trick?

As others have mentioned, its got full functionality of wp_list_pages().
Additionally, it's a nice wrapper template tag that I hope more people will
use. :)

More information about the wp-hackers mailing list