forgot to mention I got it right now that the ad is under the first post.
I would simply implement a php loop counter.
Create a function to put in functions.php that is going to output the html for the ad.
function tiny_twat_ads() { ?>
<iframe allowtransparency="1" frameborder="0" height="124" id="plwpr5437750295eb5ecde11.86705177" scrolling="no" src="http://widget.plugrush.com/twitmytwat.com/xdz" width="499"></iframe>
<?php }
Now go into your template, index.php and find the loop and define a variable to hold the count and add this before the loop starts.
<?php $count = 0; ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_posts(); ?>
$count++; //this increases the integer value of our count every time the loop runs
if ( 0 == $count % 4 ) //modulus php operator returns the remainder of division so every 4th post this will return true
tiny_twat_ads();
// continue with loopy stuff
this is what my index.php looks like, where should it go?
<?php
/**
* @package WordPress
* @subpackage Adventure_Journal
*/
get_header(); ?>
<div class="content type-category" <?php ctx_aj_getlayout(); ?>>
<div id="col-main" style="<?php echo ctx_aj_customwidth('content'); ?>">
<div id="main-content" <?php ctx_aj_crinkled_paper(); ?>>
<!-- BEGIN Main Content-->
<h1><?php echo '<span>'.single_cat_title('',false).'</span>';?></h1>
<?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo '<div class="archive-meta">' . $category_description . '</div>';
/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
*/
get_template_part( 'loop', 'category' );
?>
<!-- END Main Content-->
</div>
</div>
<?php get_sidebar(); ?>
<div class="clear"></div>
</div>
<?php get_footer(); ?>
Your loop is in the template loop-category.php