Working on a theme admin menu using http://planetozh.com/blog/my-projects/wordpress-theme-toolkit-admin-menu/ and have a bunch of functions that are used to customise a theme.
Have added over 40 options, but stuck on this one.
Code from header.php file:
<?php wp_list_pages('sort_column=menu_order&title_li=&depth=1&exclude='); ?>
Have created a function within the admin menu that stores the exclude numbers for excluding pages from the navigation menu. If I wanted pages 1, 7 and 10 excluded I'd add 1,7,10 after the exclude= in the header.php file.
The function I've created (pageexclude) allows a list of numbers like 1,7,10 to be stored in a database allowing easier excluding of pages (no need to edit the template files). The concept is working fine, for example using
<?php echo pageexclude(); ?>
Within the header.php (not within other PHP code though) file results in 1,7,10 being printed.
but adding this or similar code like:
<?php wp_list_pages('sort_column=menu_order&title_li=&depth=1&exclude=pageexclude()'); ?>
Doesn't work. I've used this sort of format through out the theme with no problems, though this is first time I'm trying to use it this way. It would appear the pageexclude function isn't parsed when put within the built in WordPress function.
This is beyond my PHP skills, any thoughts on a solution?
Thanks
David