WordPress

How To Exclude Pages From The Menu In WordPress

exclude-page-from-wordpress
mm
Written by Santosh Prasad

If you are a blogger and for your website you are using WordPress and often you need to create pages in their blog, but you don’t want to display them in menu.

In this article I will show you how to exclude pages from the menu in WordPress.

Exclude Pages From The Menu In WordPress

Mostly the menu is define in your sidebar.php page but it can be also found in another location. Open the sidebar.php file and find the below code:

<?php wp_list_pages();?>

Now replace the following code:

<?php wp_list_pages('exclude=18,20' ); ?>

As per requirement change the number of the page ID that page will not display in menu.

You can also use this plugin to exclude page from menu.

Thanks:)

Thank you! for visiting Look Linux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment