Excluding Pages In The WordPress Sidebar

WP_video_tutorial.gifI created a [tag]Youtube[/tag] video to show how you can exclude a page from showing up in the [tag]Wordpress[/tag] sidebar of your blog. I did a quick search on [tag]Google[/tag] for a [tag]plug-in[/tag] but was not able to find anything. If anyone knows of a plug-in please post on the blog.

The first thing you will need to do is edit the sidebar.php file. Do a search for the following function: [tag]wp_list_pages[/tag].

Next you will need to find the post ID for the page you want to exclude. Once you know this you will add this “&exclude=5” to your wp_list_pages function.

Example: <?php wp_list_pages(‘sort_column=menu_order&title_li&exclude=5’); ?>

Once you have modified and saved your file then upload to your server and the page will be updated.


About Josh

Speak Your Mind