Forums

Pages problem using sidebar widgets (5 posts)

  1. anabelle
    Member
    Posted 5 years ago #

    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.

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    Are you even using widgets for the sidebars? Just checking. :)

  3. anabelle
    Member
    Posted 5 years ago #

    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.

  4. Otto
    Tech Ninja
    Posted 5 years ago #

    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.

  5. anabelle
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic