Archived topic
Change default url logo
9 replies · Started by Natalia on March 5, 2017
Hi, I created a site with generatepress, on the site I created a cover page or presentation, from which you access the main page of the site, where all the content. I want to change the url of the logo, so that it goes to the main page, not to the cover page or presentation. Can you tell me where I can change the default address of the logo?
Hi Julián,
You can use the generate_logo_href filter: https://docs.generatepress.com/article/generate_logo_href/
So do something like this:
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://NEW-URL-HERE';
}
Adding PHP: http://docs.generatepress.com/article/adding-php
Let me know.
Hello, thanks to your information has been solved. Thanks for the help.
You're welcome :)
Hi,
I am trying to make a logo clickable for telephone.
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 'tel:+31999999999';
}
I tried to add the snippet in the Code Snippet plugin
but that didn't work.
Any suggestions !? Thanks !
Hi Eddy
can you raise a new topic where you have the option to share a link to the site.
Is it possible to use the new GPP Elements to insert the filter code recommended above?
No. Try one of these methods: https://docs.generatepress.com/article/adding-php/
Thanks for the super quick reply Leo!
I created a child theme and inserted the code into functions.php. Worked like a charm.
No problem :)