Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Adding AdSense to content (3.4.4 and above) (http://forum.bytesforall.com/showthread.php?t=7519)

juggledad Jun 10, 2010 06:06 AM

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.


All times are GMT -6. The time now is 02:47 AM.

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