[wp-hackers] Why does wp_page_menu exist?
Dan Gayle
dangayle at gmail.com
Wed Feb 4 20:00:10 GMT 2009
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?
More information about the wp-hackers
mailing list