Thought I would take a second to share how I figured out how to add Adsense between posts 1 and 2 without a widget. Juggledad's great tutorial here on how to do it with a widget was the basis of this, but I decided I didn't like the look of the widget area between the posts.
I am using an older version so I actually had to take 3.7.7's index.php and copy the top part in its entirety to get this to work right.
Here is the full code:
Code:
<?php list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options(); get_header(); extract($bfa_ata); global $bfa_ata_postcount; ?> <?php /* If there are any posts: */ if (have_posts()) : $bfa_ata_postcount = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?> <?php // Deactivated since 3.6.5 # include 'bfa://content_above_loop'; // Uses the following static code instead: ?> <?php bfa_next_previous_page_links('Top'); // For MULTI post pages if activated at ATO -> Next/Previous Navigation: ?> <?php while (have_posts()) : the_post(); $bfa_ata_postcount++; ?> <?php $show_widget_after_post = 1; if ($bfa_ata_postcount == ($show_widget_after_post + 1)) { echo '<div align="center" style="padding-bottom:8px; padding-top:3px; "> <script type="text/javascript"><!-- google_ad_client = "ca-pub-4976060676917875"; /* Square Between Posts */ google_ad_slot = "2257642737"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>';} ?>
Code:
<?php $show_widget_after_post = 1; if ($bfa_ata_postcount == ($show_widget_after_post + 1)) { echo '<div align="center" style="padding-bottom:8px; padding-top:3px; "> <script type="text/javascript"><!-- google_ad_client = "ca-pub-4976060676917875"; /* Square Between Posts */ google_ad_slot = "2257642737"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>';} ?>
Code:
<?php while (have_posts()) : the_post(); $bfa_ata_postcount++; ?>
Hope that helps someone!
Dani