A wordpress plugin to hide some pages from wp_list_pages
output.
Description
Easy way to hide some pages from wp_list_pages
output.
Simply add the custom field 'hide'
with any value to your page, and this page will no longer appear on the page list.
You could already do this on the ‘Pages’ widget or by adding the exclude
parameter to all your wp_list_pages
template tags. But now you can do it directly form the page editor which is, I believe, the best place to do so.
You might want to hide pages if you need some pages to exist but don’t want them to appear on your page list. For instance as Cool URIs don’t change, but some services have been removed from your site, so you write a page explaining where to go to get the equivalent service now. (not a real redirect, but still useful sometimes). Of course you don’t want this page on your page list, you prefer to only have the new services listed 😉
Unlike other more complex plugins, it uses custom field to avoid adding tables to your database.
Installation
- Download plugin archive and expand it: simply-hide-pages.zip
- Upload
simply-hide-pages.php
to the/wp-content/plugins/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- To indicate that a page should be hidden when
wp_list_pages()
is used, edit the page that you do not want to see and create a custom field with a key of “hide” and value of “true” (or anything else it does not really matter).
Screenshot
Custom field needed on page to hide
wordpress.org
Alternatively you can install the plugin from Simply Hide Pages plugin page on wordpress.org !
Please give the exact coding . . .
create a custom field with a key of “hide” and value of “true”
I just added the screenshot of Custom Fields edit form to show what is needed.
I’m not native English speaker so maybe my description need to be rephrased, I’m open to some suggestions.
Hi. For me is not hiding the page.I still can see it into the page source code, why?
Thanks.
Would you mind describing your setup ?
Especially:
Which version of WordPress do you use ?
What you are doing exactly ?
What are you expecting from Simply Hide Pages ?
I have two grandchild and several great-grandchild pages I want to hide from the navigation bar. From home, they are hidden. However if I am on another page on the site and hover mouse over the nav bar, the pages are still their. What can I do to hide these pages?
I am using WP3.01
Hello karen,
I just tested adding a few pages as grandchild and great-grandchild with the default WP 3.0.1 theme (Twenty Ten) and could not reproduce your issue.
Setting the
hide
custom field hide them from both the home page and any pages on the site. So unless your theme (or a plugin you use) lists the pages by reading the DB directly instead of using WP’swp_list_pages
function I don’t see what’s wrong.Or maybe I did get you wrong, are you describing what you want not what you get ?
You would like to hide the pages from the home menu only, and leave them in the rest of the site ?
I’m not sure it’s a good idea as visitors will not expect this behavior, but if that’s really what you want, I can look on how to do it.
Thanks,… really awesome plugin!!!!
Hi Julien
thank you very much for this plugin. was exactly what i was looking for. thank you.
cheers, Dany
Thanks, Nice plugin. I just add custom field.
Thank You
HI, where do you exactly create the custom field with a key of “hide” and value of “true” is it inside wordpress, if so where? I already downloaded your plug-in, thanks, but i can’t figure out how or where to add that custom field.
I didn’t take time to integrate it, but dinoraptor101 contributed an explanation on the support forum:
http://wordpress.org/support/topic/plugin-simply-hide-pages-100-works#post-1998728
Does this help ?