Archived topic
Select header title for snippet
3 replies · Started by Ben on April 18, 2022
Hi,
I want the link in my header title and logo to point to a different website. Thanks in advance.
I am using the following to repoint the logo in the header to our main site:
add_filter( 'generate_logo_href','generate_custom_logo_href');
function generate_custom_logo_href()
{
return 'https://projetosolutions.com';
}
This is working through snippets plugin. I followed this guide. I want to include the header title URL in the filter list but cannot find generate_logo_href via inspect element for header logo so don't know how to copy method and find what I'm looking for in the title.
1. What should I include in the filter list above to make the header title link repoint in the same way as the header logo?
2. Where is this found?
Bw,
Ben
Hi there,
you need the generate_site_title_href filter:
https://docs.generatepress.com/article/generate_site_title_href/
Example use:
add_filter( 'generate_site_title_href', function( $url ) {
return 'your_replacement_url';
} );
Hi @David,
Works perfectly. Great support. Thank you.
Bw,
Ben
Glad to hear that!