- This topic has 4 replies, 2 voices, and was last updated 5 years, 7 months ago by Skandha.
-
AuthorPosts
-
September 23, 2018 at 11:15 am #154745voodoochillParticipant
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 themee.g.
parallax-frame-child/inc/structure.php
Can someone please help? thanks
September 24, 2018 at 2:12 am #154782SkandhaParticipant@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,
SkandhaSeptember 24, 2018 at 4:04 am #154802voodoochillParticipantThanks 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
September 24, 2018 at 5:45 am #154806voodoochillParticipantJust 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?
September 24, 2018 at 6:07 am #154808SkandhaParticipant@voodoochill: Yep, that seems to be working fine. Glad you figured it out.
Kind Regards,
Skandha -
AuthorPosts
- The topic ‘link for site title tagline’ is closed to new replies.