I finally figured out how to remove page links from my WordPress blogs, and I even did it without using a Wp plugin. It only took a couple minutes and was really quite simple. If you’ve ever wanted a straightforward tutorial on how to remove a page link from the navigation bar, then this post should help you out.
For those of you who may not know already, I have zero coding and tech skills so I’ve never tried removing any of the page links from my nav bar before. But I just recently installed a Google Custom Search Engine on this blog and it required me to publish a blank page. Of course I didn’t want a link in the nav bar that went to a blank page so I had to figure out how to remove it.
Many WordPress themes are coded to automatically throw a link into the navigation bar as soon as you publish the page. However, sometimes you may want to create pages and not have the page link available or visible, like I did. This is how you can do it.
tip: You may want to save a copy of the original coding for your WP theme before you make any changes to it, just in case.
How to Remove Page Links from WordPress Navigation Bar
1. In your WordPress Dashboard, under appearance, click on editor.
2. Now look for the header, (header.php) and click on that. It should be on the right hand side.
3. You’re looking for a piece of coding that looks similar to the coding below. It should be almost exact and located near the bottom of the page.
4. Now you need to know what page or pages you want to exclude from showing up in the navigation bar and enter those into the coding. It’s not going to be the page title or what’s in the url. It should be a number. The easiest way to find the number for the page you want to remove is to go into edit page and you’ll see the number in the address bar: “?post=####” <<—– your page number.
5. This is the code you need to enter below: -the numbers will be replaced with your page numbers that you don’t want visible in the navigation.
6. Continuing from step 5, now enter that into the coding that you found in step 3, and hit save.
That’s it, you’re finished! Now you can create pages whenever you want to and remove the page links in the WordPress navigation anytime you want.
There are some WordPress plugins that you can install to do this too, “remove page link plugin wordpress“. It’s your choice, the plugin would probably make things much easier, especially if you plan on creating several pages in you blog that you want to remove the page link for. But it’s so simple to do it on your own that I didn’t even bother. The more plugins you have installed can decrease the speed and functionality of your WP theme so I only install the necessary plugins.
Any thoughts or suggestions? Feel free to leave a comment and please share this tutorial with others.