WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve (3 posts)

  1. kittel
    Member
    Posted 7 months ago #

    In my child theme I would like to change the site-title for SEO reasons from an <h1> into a <p> tag. I know some feel this is not necessary, but others do.

    At the same time I would like to increase the size of the site-title and the size of the h2 site-description

    Anybody clever enough to sort out this little bit of code?

    My site is minorsurgery.co.uk. Have a look and you know what I mean.

    Many thanks

    Martin Kittel

  2. stephencottontail
    Member
    Posted 7 months ago #

    Copy the parent theme's header.php to your child theme, and then edit the file and change the line:

    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

    to

    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> rel="home"><?php bloginfo( 'name' ); ?></a></p>.

    For your second question, in your child theme's style.css, try this code:

    .site-header p {
        font-size: 36px;
    }
    
    .site-header h2 {
        font-size: 36px;
    }

    Change the values to whatever you feel is most appropriate.

  3. kittel
    Member
    Posted 7 months ago #

    Thanks a million!

Reply

You must log in to post.

About this Topic