Really lovin’ my Thesis theme, and I’ve converted quite a few of my sites to Thesis.
One thing I always wanted to do was to put Google Adsense ads not just below my post titles, but right or left justified within my blog posts, even before I had Thesis.
I didn’t want to have to go back through all my old posts and insert them the way the lovely Chris Pearson (God bless you abundantly for creating this awesome theme and more!) recommends on the Thesis User Guide info — so I searched around to find ways to do it.
WARNING! DANGER, WILL ROGER! MAKE SURE YOU KEEP A COPY OF YOUR CUSTOM_FUNCTIONS.PHP FILE BEFORE CHANGING ANYTHING!!!
When you have the Adsense code you want to drop into your Thesis theme, go to the Thesis link on your left in your blog, choose “Custom File Editor” and then choose “custom_functions.php” and click “Edit selected file” to get to the good stuff.
I found one guy who actually has Adsense inside his Thesis posts, but copying his code didn’t work for me until I made some adjustments:
HERE’S THE THESIS CODE I PUT IN MY CUSTOM FILE EDITOR TO GET GOOGLE ADSENSE ADS LEFT-JUSTIFIED IN MY BLOG POSTS:
So you can type the code you see in the above pic EXACTLY — with your code in there — and then click the “BIG A$# SAVE BUTTON” beneath to save your changes.
What I had to change to get my Thesis Google ads to look like you see now…
First of all, doing a copy of the text code over to my site left the quotation marks looking all curly and pretty, something that Thesis — and other themes — don’t like, so I replaced all the curly cue looking quotation marks with the straight up and down ones in Notepad.
Then, even though the if/else code is probably just fine, I stripped it out anyway in my process of elimination.
You’ll see where I added div id and changed the name of the div class to be consistent.
I did other stuff while monkeying around to see what was broken — like removing my FB share button code and then I put it back — but the code you see above worked for me, so I pray it works for you.
Right or left justifying my Google Adsense ads within Thesis made my sidebar disappear down to the bottom…
…and so I just spent a few morning hours redesigning my site to put all my Amazon books and my pic in the header using the lovely Thesis Open Hook WordPress plugin that I’d misunderstood at first.
Just search for Thesis Open Hook WordPress plugin, install it, and you can find it under Appearance, where you can then put HTML code easily in places like “above header” or wherever you want to see stuff without having to monkey around inside your custom functions file directly.
Christ is my leaderboard…
So I love the fact that my Christian books and my pic are up top now, instead of in my sidebar, since I couldn’t figure out how to stop it from wrapping and I didn’t want to take out the Adsense code.
I just squeezed my sidebar length to the minimum of 60 and maxed out my content column width to 934 and went with that.
I put the “views” thing in my widget sidebar 1 since I didn’t want the default text code showing up.
So far, so great.
Looks good on Firefox and IE — but I don’t know why IE makes my header and home page link text code disappear on and off. Makes it more mysterious and alluring…
Anyway, stay tuned for how much my Adsense earnings and CTR increase as a result of this time investment.
I hear people reporting Adsense earnings through the roof (or, at least much better) when their ads are within a post and justified.
Oh, if you want it right justified, just change the “left” wording after float to “right” instead.
I might test both. But I hear people look and click a lot to the left (to the left, to the left) so we shall see!
I left the Adsense code back at the Large Rectangle, but I see on my About Page, with a really big pic, I’m going to have to adjust that one.



{ 2 trackbacks }