[wp-hackers] Exclude page by name in wp_list_pages

R.J. Kaplan just.be.happy at gmail.com
Fri Jul 21 15:25:03 GMT 2006


On Jul 21, 2006, at 9:33 AM, Paul Menard wrote:

> So what will be returned if you have two pages with the same title?

What I ended up doing is copying the whole 2 functions that deal with  
getting the page list, (wp_list_pages() and get_pages()) putting them  
in the theme's functions.php, renaming them, and changing the line  
that handles excluding pages to sort by 'post_name' instead of 'ID'.  
'post_name' , unlike 'post_title' is unique as far as I know.


More information about the wp-hackers mailing list