• Hey there,

    I am working on a website that uses WordPress as a lightweight CMS. In the hierarchy there is a section with subpages and some of those subpages have subpages so:

    Events

    – Event Calendar
    – – Calendar Event #1
    – – Calendar Event #2

    – Organize a Fundraiser

    – Past Events
    – – Past Event #1
    – – Past Event #2
    – – Past Event #3

    What I want is to NOT list the second level items under Past Events. I am familiar with using the depth tag for controlling how many levels are shown in the navigation but in this case there is a page ID that I would like to NOT show the subpages for.

    Is there a way to add an exception to that depth parameter?

    Any help appreciated.

    Cheers,
    Brandon

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s not pretty but what about the exclude parameter for the template tag, wp_list_pages().

    Thread Starter johnnyspade

    (@johnnyspade)

    Thanks Michael. I am familiar with the exclude parameter but what I am trying to do is program something where the user doesn’t need to alter code to exclude pages. It’s for a project where WordPress is being used as a CMS and the site admins won’t have code level access.

    What I ultimately did was employ someone to write a plugin that allows the user to toggle items on or off the navigation through the admin area. When it’s done, we’ll release the plugin back to the community.

    Cheers,
    B/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List Pages Tag and Depth Parameter Help’ is closed to new replies.