- This topic has 13 replies, 3 voices, and was last updated 4 years, 3 months ago by
Tom.
-
AuthorPosts
-
August 10, 2015 at 11:35 am #128161
Martin
Hi
There doesn’t seem to be an obvious setting for this and wondered how to remove the logo link to the homepage of the site?
Thanks
Martin
August 10, 2015 at 11:40 am #128162Tom
Lead DeveloperLead DeveloperDo you want to remove the link altogether or just change it to a different page?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 10, 2015 at 11:42 am #128163Martin
I originally thought remove but change would be better?
Thanks
Martin
August 10, 2015 at 11:43 am #128164Tom
Lead DeveloperLead DeveloperChanging it is much easier.
You can use this function: https://gist.github.com/generatepress/db877132386f4b77c7f4
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 12, 2015 at 3:59 am #128589Martin
That’s great Tom. Thank you.
August 12, 2015 at 4:05 am #128590Martin
Sorry Tom, I thought I had it.
When it says // Enter the URL you want your logo to link to below
return ‘http://generatepress.com’; …… where exactly do I put it?
Thanks
Martin
August 12, 2015 at 7:22 am #128626Martin
Think I might have cracked it. Does the url need to be enclosed in “url”?
Thanks
Martin
August 12, 2015 at 9:17 am #128657Tom
Lead DeveloperLead DeveloperYou would replace http://generatepress.com with your URL.
So it would be:
add_filter( 'generate_logo_href','generate_custom_logo_href' ); function generate_custom_logo_href() { // Enter the URL you want your logo to link to below return 'http://YOURURLHERE.com'; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 12, 2015 at 9:38 am #128672Martin
That was obvious wasn’t it? ๐ Thanks again for your help.
August 12, 2015 at 9:46 am #128673Tom
Lead DeveloperLead DeveloperNo problem! ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 23, 2016 at 8:53 am #246992willworksdesigns
Hi Tom,
Question: How can I alter the site name link in header to match that of the altered logo?
Thanks for the simple PHP plugin and the directions for adding the PHP to change the logo link in the header. It is simple to do. However, while the header logo links to another URL, the site name, an active link, needs to be changed to match that of the logo. Do you have another snippet of PHP that will allow me to change the site name URL as well?
PS: I use the paid version of GeneratePress (along with Visual Composer and a suite of add-ons) and LOVE it! Thanks for your hard work and commitment to GP.
Cheers,
WillNovember 23, 2016 at 10:01 am #247017Tom
Lead DeveloperLead DeveloperAbsolutely! You would do this:
add_filter( 'generate_site_title_href','generate_custom_site_title_href' ); function generate_custom_site_title_href() { // Enter the URL you want your logo to link to below return 'http://YOURURLHERE.com'; }
Glad you’re enjoying GP! ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 23, 2016 at 2:20 pm #247097willworksdesigns
Tom, thanks very much for this! Best wishes to you and your familyโฆ
November 23, 2016 at 10:59 pm #247165Tom
Lead DeveloperLead DeveloperYou too! ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.