WordPress.org

Support

Support » Plugins and Hacks » Hacks » Custom fields as functions.php variables?

Custom fields as functions.php variables?

  • I currently let Pages appear in my main navigation bar by using the includes parameter of wp_list_pages, like so:

    function sandbox_globalnav() {
    	if ( $menu = str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages('include=10, 2, 13, 91, 1324, 1405, 1356, 664, 1268, 1533, 1841&title_li=&sort_column=menu_order&echo=0') ) )

    When a new page is made, I have to manually add the page ID to this list to allow it to show.

    Can anyone offer a slicker way of doing it that won’t take long? I’m thinking there may be a way to collate a new Page custom fields setting into a global variable accessible to functions.php, which will create this list.

    Thanks!
    Matt

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom fields as functions.php variables?’ is closed to new replies.
Skip to toolbar