0
votes

I added WordPress to a static website in order to host my business blog via WordPress. I simply want the logo header atop the WordPress blog to link to my main site homepage rather than to the blog homepage.

Specifically, I want the header on all pages within this blog: http://matrixpremier.com/seo-blog/ to link here to: http://matrixpremier.com/.

I looked in every WordPress template and did not see any href link to the main blog page. Does anyone know which template manages the blog header logo, and what I should change in the code? I am using the "Gridbox" theme. I did not see what I'm looking for in header.php. Also, I am not a developer and only know basic HTML.

I searched extensively on forums for this. The closest answer was: https://wordpress.stackexchange.com/questions/37292/how-do-you-find-out-which-template-page-is-serving-the-current-page but none of the responses solved this for my situation. Some answers I didn't understand. The "What the File" plugin did not provide the answer. The Debug Bar seemed too complex and code heavy on the site. Also I do not find this in the code: php echo.

In this solution: Detect which WordPress template is being used, I wan's sure where to add the get_post_meta tag to, and what to do next then to check the result.

And I think this solution: Display which Wordpress template and template_part files are used to construct a page? is only going to tell me which template each blog page uses. That's not what I want to know. I want to know which template contains the header logo link, and I can't find it.

Thank you much in advance!

1
The first place you should look is the header.php file in your theme. Typically, your page template will call get_header() to include the header.php code. Your logo and the corresponding href link are likely there. - Mastrianni
Thanks, Mastrianni. I did check header.php several times and no go. Cale's answer below appears to be the start of a solution. Beginning with changing my theme's general settings URL. - Matrix Premier

1 Answers

1
votes

You're trying to fix this the wrong way.

If you ask Google "Change WordPress Home URL", you'll find many good links - this one is very helpful: https://codex.wordpress.org/Changing_The_Site_URL.

To answer the question you asked:
You need to understand WordPress themes, and that each theme can be very different. A good place to start is by looking in wp-content/themes - and look at the theme you're using. It's probably in the file header.php - but the link is probably being generated by a WP function such as get_site_url() - and you DO NOT want to change that.

The right way to solve the actual problem:
Instead of altering your theme, change your settings to use the correct URL. (Normally in the dashboard under "Settings" => "General" - there's two URLs you can enter, one for "WordPress" and one for "Site").

You'll even see this "tip" on that page:

Enter the address here if you want your site home page to be different from your WordPress installation directory.

Which links to this page: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory