Jump to content

Invisible "pages"


Recommended Posts

In WordPress 1.5, is there a way to create a page that is invisible? By invisible, I mean that it doesn't show up in my sidebar when you run the <?php wp_list_pages command.

 

For example, I want to create a contact form on a page, but then when users fill out the form, I want to redirect to a THANK YOU Page. But I don't want the thank you page listed by the wp_list_pages command.

 

I don't know if I'm making any sense. My brain is still fried this morning!!

Link to post
Share on other sites

Ok. Sorry. I answered my own question. But I'm posting the response here, in case it is helpful to anybody:

 

Exclude Pages from List

Exclude certain Pages from the list. Suppose you do not want Pages with ID numbers 17 and 38 to be displayed. Modify the call to this template tag in your theme's sidebar.php. The exclude argument is what removes items from the list.

 

><ul>
<?php wp_list_pages('exclude=17,38&title_li=<h2>' . __('Pages') . '</h2>' ); ?>
</ul>

 

Note: The Page is only excluded from the list; it can still be accessed from Manage->Pages by clicking that Page's "View" button. It can also be accessed by directly typing its URI in your web browser.

 

More: Excluding a Page from the list will also exclude all of its SubPages (a.k.a children) if it has any.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...