Files
Testing/tbs/wp-content/themes/bwshop/includes/vert-skyscraper.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

21 lines
1011 B
PHP

<div style="width: 100%; max-width: 160px; margin: 0 auto; padding: 0;">
<?php
$query = new WP_Query( array(
'post_type' => 'dfads',
'posts_per_page' => 1,
'orderby' => 'rand',
'tax_query' => array (
array(
'taxonomy' => 'dfads_group', // My Custom Taxonomy
'terms' => 'side-skyscraper', // My Taxonomy Term that I wanted to exclude
'field' => 'slug', // Whether I am passing term Slug or term ID
'operator' => 'IN', // Selection operator - use IN to include, NOT IN to exclude
),
),
) );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php if(get_field('custom_code')!=""){the_field('custom_code');}else{?><a href="<?php the_field('link');?>" title="<?php the_field('title');?>" target="_blank"><img src="<?php the_field('ad_image');?>" class="img-responsive center-block" alt="<?php the_field('title');?>" /></a><?php }?>
<?php endwhile; wp_reset_postdata(); ?>
<?php else : endif; ?>
</div>