blblalock Posted June 25, 2010 Share Posted June 25, 2010 I need to create a couple of pages with limited navigation items for a friend's website. I'm thinking what I need to do is use if is_page to create additional exclusions on the pages in question. I'm a PHP newb and not sure how to handle the syntax though. Here's the sandbox_glovalnav section from the site as it is now: I think if I do an if page_is statement with the snipped below used for both the "if" part of the statement and the "then" part of the statement, with the additional pages that need to be excluded, it'd do the trick. Just don't quite know how and don't want to break my friend's site. function sandbox_globalnav() { if ( $menu = str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages('title_li=&sort_column=menu_order&echo=0&exclude=254,271,274,277,279,465,454,486,545,650,816,831,904,910,946') ) ) $menu = ' ' . $menu . ' '; $menu = '<div class="menu">' . $menu . "</div>\n"; echo apply_filters( 'globalnav_menu', $menu ); // Filter to override default globalnav: globalnav_menu } Quote Link to comment Share on other sites More sharing options...
blblalock Posted June 26, 2010 Author Share Posted June 26, 2010 That should be "is_page" conditional tag ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.