[wp-hackers] Hide pages from panels

Diana K. C dianakac at gmail.com
Wed Oct 10 19:03:58 UTC 2012


Hi Mike,

I like this plugin, but I need to hide pages in panels, those are indeed 
static pages that would never change again, sort of a historic content.

I have this code, but as I said, I need to pass IDs and also doesn't hide 
them in dropdown :(

add_action( 'pre_get_posts' ,'hide_pages_87ff65f5f' );function 
hide_pages_87ff65f5f( $query ) {    if( !is_admin() )        return $query; 
global $currentpage;  $pages = array('2389','2605','2640','2970','2626'); 
if( 'edit.php' == $currentpage && ( get_query_var('post_type') && 'page' == 
get_query_var('post_type') ) )    $query->set( 'post__not_in', $pages ); 
return $query;}


----- Original Message ----- 
From: "Mike Little" <wordpress at zed1.com>
To: <wp-hackers at lists.automattic.com>
Sent: Wednesday, October 10, 2012 5:37 AM
Subject: Re: [wp-hackers] Hide pages from panels


> On 10 October 2012 03:38, Diana K. C <dianakac at gmail.com> wrote:
>
>> Hi there,
>>
>> I just converted/migrated a lot of pages and posts, now is getting hard 
>> to
>> browse pages in panel. I would like to hide pages from a specific month, 
>> in
>> panels such Pages and Parent Page dropdown as well, is there some way to 
>> do
>> this?
>>
>> I found a code some time ago but needed to informe page IDs and wasn't
>> hidding the pages in Parent Page dropdown.
>>
>> Thanks a lot!
>>
>
>
> Whilst not addressing your exact requirements, you should look at CMS Tree
> Page View (http://wordpress.org/extend/plugins/cms-tree-page-view/) as an
> alternative way to manage pages.
>
> It has a more usable interface than WordPress' own, including a folding
> tree structure, search, drag 'n' drop positioning (page order and
> parent-child), and links to all main features: edit, view, and add new
> (directly in the place you want to add it)
>
>
> Mike
> -- 
> Mike Little
> http://zed1.com/
> _______________________________________________
> 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