[wp-hackers] Excluding page from being listed via a plugin
skeltoac at gmail.com
Thu Jan 25 19:22:03 GMT 2007
On 1/25/07, Michael C. Duterte <mhykhh at gmail.com> wrote:
> and I need to exclude some admin-picked pages from being listed on the
> sidebar. I have been looking for hooks other than the wp_list_pages
> filter but couldn't find any. First question is: are there any other
> hooks that I can use for this? Second is: Is it safe to parse the string
This gives me an idea: each of the filters in WP_Query::get_posts()
are completely devoid of context. Including $q or $this as a third
parameter for each filter would make them far more useful. However,
get_pages() doesn't use WP_Query.
The function get_pages() accepts an "exclude" parameter, which is a
comma/space separated list of IDs. You can affect that parameter with
the wp_list_pages_excludes filter.
More information about the wp-hackers