When using wp_list_pages, is there anyway to exclude children pages from only a PARTICULAR parent?
I know to exclude all children I can do: &depth=1
And I COULD exclude these children one by one using ID's.
Just wondering if there's another way.
When using wp_list_pages, is there anyway to exclude children pages from only a PARTICULAR parent?
I know to exclude all children I can do: &depth=1
And I COULD exclude these children one by one using ID's.
Just wondering if there's another way.
There's exclude_tree (Note: exclude_tree argument seems to be broken if excluding more than ONE tree--see https://core.trac.wordpress.org/ticket/9153 for a fix.)
Aw man, how did I overlook that in the Codex?!
Thanks Michael!
Actually I realized this doesn't work for my purposes.
exclude_tree also excludes the parent. I just want to exclude the parent's children.
I need something like.... exclude_child_of
I'm submitting this to the "Ideas" section if it's not already there - Useful as exclude_tree is, it would be nice to also have an exclude_children argument for wp_list_pages that excluded ONLY the children and not the parent as well.
You must log in to post.