Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <section class="content">
- <?php get_template_part('inc/page-title'); ?>
- <div class="pad group">
- <?php get_template_part('inc/featured'); ?>
- <?php if ( have_posts() ) : ?>
- <div class="post-list group">
- <?php $i = 1; // initialize the post counter
- echo '<div class="post-row">'; // create the post-row div
- while ( have_posts() ): the_post(); ?> <!-- while we have posts -->
- <?php get_template_part('content'); ?> <!-- display the post content -->
- <?php if ($i % 2 == 0) { // if we've shown 2 posts
- echo '</div>'; // close this post-row div
- // BEGIN insert my custom widget
- if ($i % 6 == 0) { // if we've shown 6 posts
- dynamic_sidebar('adsense'); // display the custom sidebar widget
- }
- // END insert my custom widget
- echo '<div class="post-row">'; // create the next post-row div
- }
- $i++; // increment the post counter
- endwhile;
- echo '</div>'; // close the post-row div
- ?>
- </div> <!--/.post-list-->
- <?php get_template_part('inc/pagination'); ?>
- <?php endif; ?>
- </div><!--/.pad-->
- </section><!--/.content-->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement