• Hi,

    I’d like to add a link in the tagline of my twenty eleven header.

    I’d like the tagline to look like this:
    I believe in following your heart. See my story to find out why.

    I know the link needs is coded like this:
    <a href="https://anniehearts.com/blog/?page_id=9">my story</a>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    however, I don’t know what other code goes with it or where to place it in my child theme’s header.php file.

    Here’s my website (excuse the crazy bright colour – I’ll be changing it):
    anniehearts.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • In your child theme’s copy of header.php, you need to change:

    <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>

    to something like:

    <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    <small><a href="https://anniehearts.com/blog/?page_id=9">my story</a></small>

    and then style it appropriately via your child theme’s CSS.

    Thread Starter annie hearts

    (@annie-hearts)

    Hi esmi! You’re still my hero!

    I went into the header.php file of my child’s theme and entered the code above.

    It looks like this:

    <hgroup>
    				<h1 id="site-title"><span><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
    				<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    <small><a href="https://anniehearts.com/blog/?page_id=9">my story</a></small>
    			</hgroup>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    The “my story” is appearing just above the header in tiny print…

    Sorry – my bad. Try:

    <h2 id="site-description"><?php bloginfo( 'description' ); ?> See <a href="https://anniehearts.com/blog/?page_id=9">my story</a> to find out why</h2>

    Then go to Settings -> Tagline and change “I believe in following your heart. See “my story” to find out why.” to just “I believe in following your heart.”

    Thread Starter annie hearts

    (@annie-hearts)

    It worked perfectly!

    You get a whole boatload of gold stars today! ??

    Glad I could help ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘twenty eleven link in tagline of header’ is closed to new replies.