Title: Pages problem using sidebar widgets
Last modified: August 18, 2016

---

# Pages problem using sidebar widgets

 *  [anabelle](https://wordpress.org/support/users/anabelle/)
 * (@anabelle)
 * [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/)
 * I want to prevent child pages from showing up in the sidebar list, i edited widgets.
   php and added depth=1 in function widget_pages
 * ‘wp_list_pages(“title_li=&depth=1”);’
 * but they still show up, so I renamed the function to widget_pages2 to see if 
   that prevented pages from showing uo, but they still did, so i deleted the entire
   function and the STILL show up.
 * That makes me think that function is being ignored, what else can i do to check
   why the depth=1 argument isn’t being recieved.

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/#post-559741)
 * Are you even using widgets for the sidebars? Just checking. 🙂
 *  Thread Starter [anabelle](https://wordpress.org/support/users/anabelle/)
 * (@anabelle)
 * [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/#post-559744)
 * off course i am.
 * I did another test, i deleted one “;” from the end of a line to create a syntax
   error, and the error did came up…
 * But the changes in pages listing are being ignored.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/#post-559888)
 * Have you put that particular widget that you were messing with onto the sidebar?
   Maybe you’re using a different pages widget?
 * You’re probably not going to get an error unless it actually tries to run that
   code. If the widget is not being used, it never gets that far.
 *  Thread Starter [anabelle](https://wordpress.org/support/users/anabelle/)
 * (@anabelle)
 * [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/#post-559923)
 * Im messing with the standard widgets, and i inserted pages in the presentation
   menu..,
 * I’ve searched for other place in the file wher wp_pages_list appears but ther
   aren’t any. I editing the only one in the file.
 * Where else can i look? please help.

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

The topic ‘Pages problem using sidebar widgets’ is closed to new replies.

## Tags

 * [list](https://wordpress.org/support/topic-tag/list/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [anabelle](https://wordpress.org/support/users/anabelle/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/pages-problem-using-sidebar-widgets/#post-559923)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
