These days I want to talk about a neat small tip for hiding or displaying specified pages from your WordPress blog or site's navigation menu. It really is really very straightforward, and really handy if you do not know how to do it presently. Here is the line of code that is either presently inserted somewhere in your WordPress template files (most probable the header.php file) or wants to be additional to your WordPress template files in order to exhibit the listing of your website's pages: This line of code displays each and every single a single of the website's pages that you have produced in your WordPress admin panel. But suppose you do not want a few of the pages to be shown in the primary navigation? How do you manage which pages are shown and which are not? All you need to have to do is simply include to the code mentioned over. We are heading to include the page IDs that you want to exclude. (Notice: You can find the page or submit IDs by goingto the checklist of pages or posts in your WordPress admin panel. Hover your mouse cursor more than the page or publish titles and seem at the position bar at the bottom of your display. The ID amount is the quantity at the quite stop of the hyperlink that displays. Leave a remark below if that is not distinct and you need much more help.) Now that you know which web page or submit IDs you plan to exclude, add the numbers to your code, like the example below: And that's all there is to it! Now the pages that you want to conceal from the navigation menu will not be displayed. Now - if there are much more pages to exclude than to include, you may possibly want to do this the other way about. Add this line of code to define the only pages that you want to display in the navigation menu: wordpress themes
Related Articles -
wordpress tutorial, wordpress plugins, wordpress themes,
|