Between Posts. I am using a wordpress tube site
ex
Video 1
Video 2
Video 3
--ad--
video 4
video 5
tnx. I;'ve google around, nothin..
ex
Video 1
Video 2
Video 3
--ad--
video 4
video 5
tnx. I;'ve google around, nothin..
function videoad1_shortcode(){
return 'ad1 html goes here';
}
function videoad2_shortcode(){
return 'ad2 html goes here';
}
function videoad3_shortcode(){
return 'ad3 html goes here';
}
add_shortcode('videoad1', 'videoad1_shortcode');
add_shortcode('videoad2', 'videoad2_shortcode');
add_shortcode('videoad3', 'videoad3_shortcode');


if ( ( $wp_query->current_post + 1 ) % 3 === 0 ) {
echo 'after every 3rd post'; // add the html ad code here
}
<?php if ( ( $wp_query->current_post + 1 ) % 3 === 0 ) :?> <a href="http://gfy.com"><img src="ad.jpg"></a> <?php endif;?>


Comment