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 code below Title in Single Posts (http://forum.bytesforall.com/showthread.php?t=14099)

mkellam May 9, 2011 03:22 PM

Adding Adsense code below Title in Single Posts
 
Hi,
I'm trying to add Adsense code below the Title on single post pages only.

In ATO> Style & Edit Center Column, "The Loop", I tried to add the code between the post_byline and post_bodycopy php statements. This does add the ad below the Title, but also adds it to the Front page of our site under each of the excerpt titles. The front page is set up to show one single post and post excerpts after that.

How might I accomplish this?

Thanks!

Michael

juggledad May 9, 2011 03:39 PM

You will need to add a PHP conditional statement using the wordpress conditionals (see http://codex.wordpress.org/Conditional_Tags)

mkellam May 9, 2011 03:51 PM

Ahhh thanks! So if I also want an ad to appear every "Xth" item on category pages, I'd use a different conditional in the same place in "The Loop", right?

juggledad May 9, 2011 04:01 PM

yup, look at the example, just count the posts.


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

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