Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

Adding AdSense to content (3.4.4 and above)


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
 
Prev Previous Post   Next Post Next
  #1  
Old Jun 10, 2010, 06:06 AM
juggledad's Avatar
juggledad
 
22,253 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Adding AdSense to content (3.4.4 and above)

By putting in some simple php logic in the 'Content ABOVE the LOOP' you can have your AD show up at the top of the center area before the posts
HTML Code:
<?php if (is_single() or is_front_page()) { ?> <div class="bfa-adsense"> 
    PUT  
    YOUR  
    WHOLE  
    ADSENSE  
    CODE  
    HERE 
    </div> 
<?php }; ?>
and adding the following to the CSS Inserts
HTML Code:
div.bfa-adsense {
float: left;
display: block;
margin: 1em 10px 5px 0; /* margin 1em top, 10px right, 5px bottom, 0 left */
}
should be all you would need. This way the code is stored as one of the Atahualpa options in the DB and will not need to be changed during an upgrade.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding AdSense to content Jerry Atahualpa 3 Wordpress theme 51 Jun 10, 2010 05:48 AM
Adding echo content next to the post title emanuel1969 Center area post/pages 4 Apr 27, 2010 06:48 PM
Adding Content to 'Bars'? DannyLife Header configuration & styling 1 Jan 23, 2010 07:06 AM
Adding Adsense Units in Atahualpa 3.4.1 djrishi Atahualpa 3 Wordpress theme 1 Aug 7, 2009 01:57 PM
Adding Adsense to Kicker and Content adum Post-Kicker, -Byline & -Footer 2 Jun 22, 2009 09:29 AM


All times are GMT -6. The time now is 03:33 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.