Site logo

[Resolved] Select header title for snippet

Home Forums Support [Resolved] Select header title for snippet

Home Forums Support Select header title for snippet

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2192049
    Ben

    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

    #2192074
    David
    Staff
    Customer Support

    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';
    } );
    #2192109
    Ben

    Hi @David,

    Works perfectly. Great support. Thank you.

    Bw,
    Ben

    #2192129
    David
    Staff
    Customer Support

    Glad to hear that!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.