Thoughts on life, liberty, and information technology

Hide the “Home” link in the Squirrel theme for WordPress

This is one of those “I’m going to post this as a note to myself” posts…

I recently found the Squirrel theme for WordPress, which is a good for simple corporate-looking sites. One thing I wanted to do was to remove the “Home” link. Here’s how.

In the theme editor section, edit the file squirrel-functions.php. Find the method squirrel_nav_menu_items. In it, comment out all lines except the last line. The function should now look like this:

[php]function squirrel_nav_menu_items($items) {
/*
if (is_home()) {
$homelink = ‘<li class="current_page_item">’ . ‘<a href="’ . home_url(‘/’) . ‘">’ . __(‘Home’, ‘squirrel’) . ‘</a></li>’;
} else {
$homelink = ‘<li>’ . ‘<a href="’ . home_url(‘/’) . ‘">’ . __(‘Home’, ‘squirrel’) . ‘</a></li>’;
}
$items = $homelink . $items;
*/
return $items;
}[/php]

That’s it; home link gone. Nice free theme, and nice easy hack.

One response to “Hide the “Home” link in the Squirrel theme for WordPress”

  1. Gianluca Avatar
    Gianluca

    Hello
    I have the free version of the theme Squirrel 1.5, but after this hack Squirrel’s home page does not work! The home page (index.php) remains the classic homepage Squirrel and I can not put one in my custom 😦 please help me

    Like

Leave a comment