How to Exclude Pages from WordPress

How to Exclude Pages from WordPress

Sometimes, bloggers have to create pages in their blog, but do not want to display them in the menu bar. This post will show you how to exclude pages from the menu bar in WordPress.

How to Exclude Pages WordPress

In most cases, the menu is located at your sidebar.php but it can be located in other files. Open that file and locate the following code:

<?php wp_list_pages();?>
Replace the following code with:	
<?php wp_list_pages('exclude=12,14' ); ?>

Now you can change the number to the page ID you don’t want to display and that page will not be displayed in the menu. For more details take a look @WordPress codex
There is also a plugin that allows you to do this. It is called Exclude Pages.

Read: How to embedd Google hangout in WordPress

Related Post

Also Read  How to Create Menu Navigation in WordPress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu