Forums

[resolved] How do I control Depth Parameter on Pages Sidebar Widget? (3 posts)

  1. ManticoreTT
    Member
    Posted 2 years ago #

    Hello, I am new to WordPress and to coding.

    I am using the Pages widget in my sidebar and would like to limit it to displaying only the top level of Pages. I was able to find the description of the depth parameter in the "Template Tags/wp list pages" section, but I am uncertain how to use this code with the Pages widget.

    Any help would be appreciated, as I am in over my head and still learning to swim.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Consider downloading and installing Otto's PHP Code Widget.

    Then put something like this in one of those widgets:

    <?php wp_list_pages('depth=1'); ?>

  3. ManticoreTT
    Member
    Posted 2 years ago #

    Thanks... hours of searching for a 30 second fix.

Topic Closed

This topic has been closed to new replies.

About this Topic