[Support request] linktarget of site-title

Home Forums Support [Support request] linktarget of site-title

Home Forums Support linktarget of site-title

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #233986
    Jens

    Hi there,

    one has the option to either integrate his own logo into the header or leave the site-title and show it. If this is done, then the site-title is a clickable link that targets the home directory ( http://example.com/).
    I would like to change that so that the linktarget is something like http://example.com/newtarget).
    How do I do this? I have no idea yet.

    Thanks in advance

    #234073
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can use a function like 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';
    }

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

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