Support » Themes and Templates » Custom Header, changing styles

  • not sure how to do this.

    I am using twenty twelve, and I would like to change the style of the header text. I can start to do what I would like in a child theme but what I really want is to use two different h tags in the header (or i guess a span?).

    eg:
    <h1>my </h1><h2>new </h2><h1>website</h1>

    <h1 class="site-title">
    <a href="http://abc.com/">my new website</a>
    </h1>

    I dont know how to get at the code, I dont know how to get to the “new” so that it specificly could be a different weight than the reast of the title.

    kind of like how the title works on this site:
    http://www.clarkrichardnelson.com/

    here is the site I am working on:
    http://adeepriver.com/wp_crn_site/

    I guess i could use a image, but I it just does not feel elegant.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You’d probably be best off using a span tag around the middle section – don’t use multiple h tags (you’ll mess up your SEO a lot for one thing). So the rendered HTML would look something like this:

    <h1>clark<span class="richard">richard</span>nelson</h1>

    and you’d target the “richard” part using CSS with that class:

    h1 span.richard {
       styles go in here;
    }

    But because of how the current header.php is coded — i.e. pulls the site title — I don’t think you can do what you want without hard coding the HTML. That may or may not be ideal, but it’s an option.

    Thank you,

    soved the problem, yes may not be ideal, and happier with that than a gif.
    now just have to remember that if i change the header or rather use this child on another blog.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Header, changing styles’ is closed to new replies.