[wp-hackers] Excluding page from being listed via a plugin

Chris chris.hearn01 at ntlworld.com
Fri Jan 26 14:24:59 GMT 2007


Suggest putting your pages into a good hierarchy, then can exclude then 
just using the top of that tree and the normal WP functions
Cheers
Chris



Andy Skelton wrote:
> 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.
>
> Cheers,
> Andy
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>


More information about the wp-hackers mailing list