"Home" link not working on subsites
Yet another issue with my new installation of a WP network.
The “Home” link on my subsites is directing to the home page of the network’s main site, not the homepage of the subsite. So if I’m on
http://example.com/foo, no matter what page I select as my default static page in Settings > Reading, that link in the menu will go to
I assume this is an issue with my theme and how it generates the menu? Though I’m having trouble digging into the files to find exactly where I can edit the menu.
The other odd thing is that the logo on the site, in the header, functions correctly. It links to
Which “Home” link? Is this something that’s in your theme, is it something that you added using a plugin or a menu?
I use the built-in WP menu setup to make my navigation, and use a static front page. No matter what that static front page is, the link in the menu to go to it takes the user to the base URL rather than the subsite’s sub-directory.
Unfortunately I inherited this custom theme, and have to edit it. From what I can tell, the theme sends any link to the front static page to “/”, which redirects back to the base URL instead.
I’m just not sure where, in the theme files, I would find the menu. Once I do, what would be the proper link to send the home page link to, rather than “/”?
Rather than using “/”, you should use
<?php bloginfo( 'url' ) ?>or
<?php echo get_bloginfo( 'url' ) ?>.
If I had to guess, I’d say that the menu you need to edit is in either the index.php file or the header.php file (if that exists), but I can’t say for certain.
Theme authors can put menus just about anywhere they want, and, judging by the fact that the original theme author used “/” for the home URL, that person probably didn’t follow too many standards in developing the theme (not slagging on the developer – whenever I look at themes I developed 3 or 4 years ago, I’m appalled at how bad my code was, too).
- The topic ‘"Home" link not working on subsites’ is closed to new replies.