Title: &#8216;exclude&#8217; pages in functions.php file
Last modified: August 19, 2016

---

# ‘exclude’ pages in functions.php file

 *  Resolved [jewessel](https://wordpress.org/support/users/jewessel/)
 * (@jewessel)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/exclude-pages-in-functionsphp-file/)
 * I am using a theme that is a child of Hybrid, and I found the array that I need
   to edit to get the effect that I want. I want to have two lines of navigation,
   but only have 3 pages in one navbar, while I have the rest in the 2nd navbar.
 * The top nav bar has a home link & “contact” link. The array for that is in the
   original Hybrid theme in the hooks-filters.php file. It looks like this:
 *     ```
       function news_cat_nav() {
   
       	$args = array(
       		'style' => 'list',
       		'hide_empty' => true,
       		'exclude' => 192,
       		'use_desc_for_title' => false,
       		'depth' => 4,
       		'hierarchical' => true,
       		'echo' => false,	// Leave as is.
       		'title_li' => false,	// Leave as is.
       	);
   
       	echo "\n\t<div id='cat-navigation'>\n\t\t";
   
       	echo '<div id="cat-nav" class="cat-nav"><ul class="menu sf-menu">' . str_replace( array( "\t", "\n", "\r" ), '', wp_list_pages( $args ) ) . '</ul></div>';
   
       	echo '<div id="feed"><ul>';
       	echo '<li class="feed-url"><a href="' . get_bloginfo( 'rss2_url' ) . '" title="' . __('Subscribe to the feed', 'news') . '">' . __('Subscribe', 'news') . '</a></li>';
       	echo '</ul></div>';
   
       	echo "\n\t</div>\n";
       }
       ```
   
 * This currently works, and excludes 192, but I would like to add a second page
   number (538) to the ‘exclude’ line, but when I change it to `'exclude' => 192,538,`
   it breaks.
 * Can someone help me figure out how to edit this? Thanks!!!
 * (Actually I am using 2.9.2, but the drop-down doesn’t offer that option.)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/exclude-pages-in-functionsphp-file/#post-1438320)
 * Try:
 *     ```
       $excludes = '192,538';
       $args = array(
       		'style' => 'list',
       		'hide_empty' => true,
       		'exclude' => $excludes,
       		'use_desc_for_title' => false,
       		'depth' => 4,
       		'hierarchical' => true,
       		'echo' => false,	// Leave as is.
       		'title_li' => false,	// Leave as is.
       	);
       ```
   
 *  Thread Starter [jewessel](https://wordpress.org/support/users/jewessel/)
 * (@jewessel)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/exclude-pages-in-functionsphp-file/#post-1438403)
 * That didn’t work. 🙁
 *  Thread Starter [jewessel](https://wordpress.org/support/users/jewessel/)
 * (@jewessel)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/exclude-pages-in-functionsphp-file/#post-1438458)
 * Sorry – I didn’t see that you had changed the “exclude” line in the array. But
   after fooling around, I figured out another fix. I put the numbers inside single
   quotes and that worked.
 * `'exclude' => '192,538'`

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘‘exclude’ pages in functions.php file’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [jewessel](https://wordpress.org/support/users/jewessel/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/exclude-pages-in-functionsphp-file/#post-1438458)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
