Advertising Manager
How to check if an ad exists (1 post)

  1. Cultivate
    Posted 5 years ago #

    Is it possible to check if a certain type of advert exists?

    Im currently using this to display ads

    <div class="side-rect-ad">
    <?php advman_ad('Rectangle Test'); ?>
    <p class="small">Advertisment</p>

    If there are no ads named rectangle test i'd like to be able to hide the full side-rect-ad div.

    If this was a custom field i could do something like this

    <?php $image=get_post_meta($post->ID, 'post-image', true);
        <?php if ( $image ) { ?>
          <!-- layout with image -->
        <?php } else { ?>
     <!-- layout without image -->
        <?php endif; ?>


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic