Get the ad image
I am using a plugin that allows me to list a custom category "Sponsored" on the sidebar but I need to know how to pull in the ad image also. Does anyone know the code for pulling the ad thumbnail in.
THis is the code I am trying to pull the image into..
<div class="sidebar-categories-container">
<?php while ($sidebar_query->have_posts()) : $sidebar_query->the_post(); ?>
<div id="sidebar_category_<?php the_id(); ?>" class="sidebar-categories-box">
<?php if ( $instance['thumbnail_size'] != 'none' and function_exists('has_post_thumbnail') and has_post_thumbnail() ) : ?>
<div id="sidebar_category_image_<?php the_id(); ?>" class="sidebar-category-image-right alignright">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail($instance['thumbnail_size']); ?>
</a>
</div>
<?php endif; ?>
<h3 class="sidebar_category_title">
<?php if ( $instance['show_date'] ) : ?>
<span class="sidebar-categories-date">
<?php the_time(get_option('date_format')); ?>
</span>
<?php endif; ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<?php if ( $instance['show_excerpt'] ) : ?>
<span class="sidebar-excerpt"><?php gs_the_excerpt($excerpt_args); ?></span>
<?php endif; ?>
</div>
<?php endwhile; ?>
</div>