11 May 2019 at 09:10 #21197
Change URL link of logo to external siteResolved
Hey there! Have you noticed this support service is provided FREE of charge?
If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you ♥
Awesome theme! Just getting started with it.
I am looking to change the link of the logo to a different one than the homepage (an external URL actually)
I have dug around in the code but cannot seem to find where to override the site URL for this.
Can you point me in the right direction?
M13 May 2019 at 09:07 #21200Oliver JuhasKeymaster
Thank you, I’m glad you like the theme :)
The best approach would probably be to copy the
templates/parts/header/site-branding.phpfrom Reykjavik theme to your (keeping the folder structure) and edit the file there:
<?php echo esc_url( home_url( '/' ) ); ?>with your custom URL.
<?php the_custom_logo(); ?>with the logo image you want to use and wrap it in your custom URL link. If you still want to use the WordPress’
the_custom_logo()function, you would need to change its link URL via
get_custom_logofilter hook, so editing this directly into the file is better approach in this case I think.
WebMan Design13 May 2019 at 09:42 #21202
I ended up googling some more and did it this way: https://stackoverflow.com/questions/38737209/change-my-custom-logo-link-wordpress
Put this solution in the functions.php file and it worked a treat! Can you foresee any issues doing it this way?
(Sorry, I am quite new to php)
M13 May 2019 at 09:46 #21204Oliver JuhasKeymaster
First, of all, please never edit the theme core files. You will loose all yourwhen you update the theme in the future. Use a for your .
The solution you’ve linked to is using the
get_custom_logofilter hook approach I’ve mentioned in my previous reply. This will only change the URL for your logo image, but not the logo text.
Please use my suggested solution for Reykjavik theme to set custom URL for the whole logo section of the theme.
WebMan Design13 May 2019 at 10:12 #21205
- You must be logged in to reply to this topic.