Ads after x number of Posts in Block Layout>Block Layout
-
I created a List Layout and tried to add ad using Query Filter but was unsuccessful, is there any way to How to show ads after x number of Posts in Block Layout>Block Layout?
Used Code:
function awwwd_loop_ad_function(){
$count = 0;
while ( have_posts() ) : the_post();
$count++;
if ( $count % 4 == 0 ) { ?>
<?php the_ad(157992); ?>
<?php }
endwhile;
}
add_filter(‘awwwd_loop_ad’, ‘awwwd_loop_ad_function’);
- The topic ‘Ads after x number of Posts in Block Layout>Block Layout’ is closed to new replies.