Placing adsense after first post on homepage need help


I wanted to insert and adsense right after the first post on the home page… I am not talking about individual Single post…
You can check my site layout here
I have search over the internet but couldn’t find an appropriate answer…

I think i need to do some editing here…

[php]if ( ! ( is_home() && $graphene_settings[‘frontpage_posts_cats’] && ! have_posts() ) ) {
while ( have_posts() ) {
get_template_part( ‘loop’, ‘index’ );

I need something like this integrated into the code…
Please note:i want to place the ad only after first post.

[php]<?php if ( $postcount == 1) { ?>
Adsense Code Goes Here

<?php } ?>[/php]

Please if some one can help me with this…thanks


Well, without studying your entire setup, it looks like the posts are here:
while ( have_posts() ) {
get_template_part( ‘loop’, ‘index’ );

So, just before that part create a variable, like $firstpost=0;
Then inside the above post(); use this just after the post()…
adsense goes here…
So, when the first post is posted, the adsense would go next.
After that first post, no more adsense would be displayed…
Something like that should work… Good luck…


Thanks for your help.