Title: [Plugin: Simply Hide Pages] Feature request
Last modified: August 19, 2016

---

# [Plugin: Simply Hide Pages] Feature request

 *  [concise](https://wordpress.org/support/users/concise/)
 * (@concise)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/)
 * It is simple!
    It hides pages from the menu! It does not hide pages from searches…
   perhaps in the next version? or in a variation?
 * [http://wordpress.org/extend/plugins/simply-hide-pages/](http://wordpress.org/extend/plugins/simply-hide-pages/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [julienvdg](https://wordpress.org/support/users/julienvdg/)
 * (@julienvdg)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/#post-1940576)
 * Thanks !
 * Yes it was not designed to hide pages from the searches. I’ll have to look if
   it’s easy to do… If it is I’ll do a new version 😉
 *  Thread Starter [concise](https://wordpress.org/support/users/concise/)
 * (@concise)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/#post-1940577)
 * I managed it by adding the following to functions.php, but would go better in
   a plugin (but really WP should have Visibility: public, password, private & **
   hidden**.
 *     ```
       /*
        * from brickbrigade's code at http://wordpress.org/support/topic/get_post-query-where-posts-dont-have-a-specific-meta_key-1
        */
       add_filter('query_vars', 'metakey_queryvars' );
       function metakey_queryvars( $qvars )
       {
         $qvars[] = 'not_meta_key';
         return $qvars;
       }
   
       add_filter('posts_where', 'metakey_where' );
       function metakey_where( $where )
       {
           global $wp_query;
           global $wpdb;
   
           if( isset( $wp_query->query_vars['not_meta_key'] )) {
              $where .= $wpdb->prepare(" AND $wpdb->posts.ID NOT IN ( SELECT post_id FROM $wpdb->postmeta WHERE ($wpdb->postmeta.post_id = $wpdb->posts.ID) AND meta_key = %s) ", $wp_query->query_vars['not_meta_key']);
           }
           return $where;
       }
   
       /*
        * variation of jamesstiff's code at http://wordpress.org/support/topic/excluding-pages-from-search-results
        */
       function mySearchFilter($query) {
       if ($query->is_search) {
       $query->set('not_meta_key', 'hide');
       }
       return $query;
       }
       add_filter('pre_get_posts','mySearchFilter');
       ```
   
 *  Plugin Author [julienvdg](https://wordpress.org/support/users/julienvdg/)
 * (@julienvdg)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/#post-1940622)
 * Thanks for the code !
 * In the mean time I found the following plugin (untested though) :
    [simply-exclude](http://www.codehooligans.com/projects/wordpress/simply-exclude/)
 * I might improve simply-hide-page to also hide from search later…
 *  Thread Starter [concise](https://wordpress.org/support/users/concise/)
 * (@concise)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/#post-1940624)
 * Simply-Exclude looks good but for pages it appears to only exclude them from 
   searches. And with 2084 lines of code, it is slightly longer than your plugin
   🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Simply Hide Pages] Feature request’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simply-hide-pages.svg)
 * [Simply Hide Pages](https://wordpress.org/plugins/simply-hide-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-hide-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-hide-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-hide-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-hide-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-hide-pages/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [concise](https://wordpress.org/support/users/concise/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-simply-hide-pages-feature-request/#post-1940624)
 * Status: not resolved