Support » Plugin: Ad Injection » [Plugin: Ad Injection] Custom post types

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author reviewmylife

    (@reviewmylife)

    Hi KyleGM, This is a good idea and I’ve put it on my future list. In the mean time you could use one of the other filtering methods to prevent ads from appearing on those pages (filter by categories, tags, id).

    Is this any close to implementation? Thanks.

    Plugin Author reviewmylife

    (@reviewmylife)

    Unfortunately not 🙁 Right now I don’t have any time to work on the plugin. It is possible that I might much later in the year, but I can’t make any promises.

    Ok, for those who are interested, I found an easy way to do it, by adding a conditional around the ad code.

    Note that I am using this inside a post, not the loop. As follows

    <?php if(!is_singular(‘question’)): ?>
    <ad code>
    <?php endif; ?>

    In this case above, it checks to see if the post type is not ‘question’
    and serves the ad.

    If you wanted the opposite, use
    <?php if(is_singular(‘question’)): ?>
    <ad code>
    <?php endif; ?>

    If post type is ‘question’, serves the ad. The difference is the absence of a single exclamation (!)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Ad Injection] Custom post types’ is closed to new replies.