shlinklincoln
Member
Posted 5 years ago #
I want to exlude page number 70 but not sure how to edit the following code in my Header:
<?php wp_list_pages('title_li=&depth=1&'.$page_sort.'&'.$pages_to_exclude)?>
Do I add 70 after "pages_to_exclude"? My attempts to play with the code result in errors. I'm still learning PHP.
Thanks for any help.
The $pages_to_exclude is a variable that might be reference somewhere else in your code (as is $page_sort).
Might want to paste your whole template (header.php) at http://wordpress.pastebin.ca/ and report the link back here.
If not, review wp_list_pages().
It should look like this
<?php wp_list_pages('title_li=&depth=1&page_sort=asc&exclude=1')?>
Where exclude=1 the 1 equals the page ID/s you'd like to exclude.
Further Reference
http://codex.wordpress.org/Template_Tags/wp_list_pages
shlinklincoln
Member
Posted 5 years ago #
That worked!
Thank you very much.