Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #154745
    voodoochill
    Participant

    The site title automatically links to the home page, which is all good as expected. However I would like the site description/tagline to have a hyperlink to a different page.

    I can do this by editing /inc/structure.php of the main theme – however this does not work if I do the edit in the child theme

    e.g. parallax-frame-child/inc/structure.php

    https://musicasecreta.com

    Can someone please help? thanks

    #154782
    Skandha
    Participant

    @voodoochill: This is not the way to do it. To add a hyperlink to site-tagline
    Go to => Child Theme Folder => functions.php and add the code in this link.

    Replace the link https://wordpress.org in the code with your URL.

    Let me know if this works out!
    Kind Regards,
    Skandha

    #154802
    voodoochill
    Participant

    Thanks Skandha.

    That works but with a couple of issues

    1. The link of the tagline shows the hover colour instead of normal state (I can fix that with CSS though of course

    2. The main navigation moves lower down, with the left most nav item moving down lower than the others

    #154806
    voodoochill
    Participant

    Just discovered it does (almost) work if I put the URL outside the h2

    so instead of

    //Add Tagline
    	$header_text .= '<h2 class="site-description' . $tagline_class . '"> <a href="' . esc_url( 'https://wordpress.org' ) . '">' . get_bloginfo( 'description' ) . '</h2>';

    I do this:

    
    //Add Tagline
    		$header_text .= '<a href="https://wordpress.org"><h2 class="site-description' . $tagline_class . '">' . get_bloginfo( 'description' ) . '</h2></a>';

    It needs some styling for the link hover but seems to work. Do you think this is OK?

    https://musicasecreta.com/

    #154808
    Skandha
    Participant

    @voodoochill: Yep, that seems to be working fine. Glad you figured it out.

    Kind Regards,
    Skandha

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘link for site title tagline’ is closed to new replies.