I’m not sure why, but out-of-the-box, WordPress’s excellent TwentyTwelve theme prevents you from putting anything in the (empty!) top-right area of the page. It’s a great place for a “contact” link or similar (and check out the Suffusion theme to see how many widget areas a good WP theme ought to have…).
What’s preventing it?
After a little exploration, I found that the H1 tag is inheriting a:
[css]
clear:both;
[/css]
although this didn’t show up in Chrome’s CSS inspector (hmm…). Anyway, the fix was quite simple:
- From WP dashboard, go: Appearance -%gt; Editor
- Select the “Header(header.php)” file
- near the top, find the “<hgroup> <h1>” part
- in the h1 tag, append an override to get rid of the clear:
- “<h1 […whatever was there already…] style=”clear:none;”>”
- above the h1 tag, but inside the hgroup tag, add your logo:
- an image: “<img src=”…your image…”/>
- some php / a widget: “[copy paste whatever you wanted]”
- Don’t forget: click “Update file” button on that page, or you’ll lose your changes ;)
1 reply on “WordPress: Add logo top right in Twenty-Twelve theme”
I don’t think your instructions are accurate. I finally made them work by looking at the source code of your own post:
– img src should have the following syntax: <img src=”http://…” style=”float:right”/>
– it should be ABOVE <hgroup> not below it