Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $how_often_to_show_widget = 2;
- if (have_posts()) :
- $post_count = 0;
- while (have_posts()) : $post_count++;
- the_post();
- if (is_active_sidebar('inter-posts-1') && $post_count % $how_often_to_show_widget == 0): ?>
- <div class="widget-area">
- <?php dynamic_sidebar('inter-posts-1'); ?>
- </div>
- <?php endif; ?>
- <?php get_template_part('template-parts/post/content', get_post_format());
- endwhile;
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement