Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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)


  #1  
Old Jun 10, 2010, 06:06 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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 12:34 AM.


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