WordPress Tutorial: How to Include Or Exclude Particular Internet pages From Your Navigation Menu

Posted in WordPress on Sep 4, 2014

Now I want to talk about a neat very little idea for hiding or exhibiting selected web pages from your WordPress blog or site’s navigation menu. It truly is really rather uncomplicated, and very useful if you will not know how to do it presently.

Right here is the line of code that is possibly currently inserted somewhere in your WordPress template data files (most very likely the header.php file) or requirements to be extra to your WordPress template data files in get to show the listing of your website’s internet pages:

This line of code shows every single one just one of the website’s webpages that you have designed in your WordPress admin panel. But suppose you will not want three of the webpages to be exhibited in the key navigation? How do you handle which webpages are shown and which are not?

All you need to have to do is simply just add to the code outlined over. We are likely to add the site IDs that you want to exclude.

(Take note: You can come across the web site or submit IDs by heading to the record of internet pages or posts in your WordPress admin panel. Hover your mouse cursor more than the website page or submit titles and glance at the status bar at the bottom of your screen. The ID selection is the range at the extremely finish of the website link that reveals. Depart a remark beneath if that is not clear and you will need a lot more help []).press()

Now that you know which page or article IDs you strategy to exclude, increase the figures to your code, like the illustration under:

And that is all there is to it! Now the webpages that you want to cover from the navigation menu will not be displayed.

Now – if there are extra webpages to exclude than to consist of, you may want to do this the other way all around. Add this line of code to determine the only internet pages that you want to show in the navigation menu:

By Libby Fisher

Leave a Reply

Your email address will not be published. Required fields are marked *