Removing The Home Link In The Autumn Forest Theme
I was recently browsing the WordPress.org Support Forums and trying to help those that I could. I ran across an individual having an issue with the Autumn Forest WordPress theme. His issue was that he wanted to remove the Home link that was displaying in the page navigation but after searching for hours online he couldn’t find the code.
After I glanced over the code for theme I quickly found the issue he was having. Instead of adding the code into the header.php file like most themes have, the theme author had created a function to display the navigation. So instead of the code being in the header.php file, it was in fact inside of the functions.php file.
Editing functions.php to remove the Home link
To remove the Home link, make your way into the functions.php file. Once opened you will see a line of code that looks like the following…
<li class="
<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single())
or (is_paged()) or (is_search())) {?>current_page_item<?php} else {
?>page_item<?php} ?>">
<a href="<?php echo get_settings('home'); ?>">Home</a></li>
This is the code that displays the home link and the bulk of it actually just sets a specific class for CSS styling. All that you have to do to remove the Home link is delete the entire line of code as shown above, update the file and you are done.
Feedback!
If you read this post and understood it great! Let me know in the comments below. If you are still having issues and can't get it figured out, you are more than welcome to leave a comment or send me an email using the contact form and I'll do what I can to help!