Remove In Post Ads from Appearing On One Blog Post?

Hi all,

Looking for advice for the easiest way to remove In Post Ads from only one post on our site. We are advertising a contest we're having across all of our posts, but we're writing up a contest description post and don't want the regular In Post Ads to appear in it.

Is there a quick function I can add to my theme's functions file to remove the In Post Ads from one post on our site? If so, any pointers to how that code would look?

  • aecnu
    • WP Unicorn

    Greetings awarner20,

    Thank you for being a WPMU Dev member!

    The only answer that I can think of sure to work is to either disable the ads altogether or to place the post on a site that does not contain advertising, then use a redirect or link to take them to the page.

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Cheers, Joe :slight_smile:

  • Adam W. Warner
    • Site Builder, Child of Zeus

    Hi Joe,

    This thread is not resolved. Unfortunately, what you've suggested isn't possible for me to do.

    What I'm looking for is a custom function to target the specific page URL and then filter the post output to exclude the In Post Ad custom post type. I know it's possible, I just don't know how to write functions properly.

    I went to wpquestions.com to submit a question, but it looks like they've fallen victim to the dreaded PayPal account freeze so I'm unable to post my question there. I'll keep looking, but if you could forward this thread onto one of the devs so they may offer their advice, I would appreciate it.

    For reference, the In Post Ad custom post type is outputting this code...

    <div class="wdca_ad_item wdca_custom_ad">
    MY AD TITLE HERE
    
    <div class="wdca_ad_body_full">
    MY AD CONTENT HERE
    </div>
    
    <a class="wdca_read_more wdca_button" href="http://MYLINKHERE"><span>LEARN MORE NOW</span></a>
    <div class="wdca_stars"></div>
    </div>

    ...and the CSS associated with this is...

    .wdca_custom_ad {
        background: none repeat scroll 0 0 #F8F8F8;
        border: 1px solid #CCCCCC;
        margin: 0 0 10px;
        overflow: hidden;
        padding: 10px;
        width: 96%;
    }
  • Adam W. Warner
    • Site Builder, Child of Zeus

    Hi James and Joe. I'm wondering if there has been any update on the In Post Ads plugin to allow targeting per post/custom post type/page?

    I have been using a slick plugin named Magic Action Box that has this very same feature and they've done it in a way that is exactly what I envision for In Post Ads. I've made a short video showing you what I mean here:
    http://youtu.be/iFYXSWqrY6M

    Thanks for considering this as an update, I think it would bring In Post Ads to a new user-friendliness level:slight_smile:

    Adam

  • James Farmer
    • CEO (of WPMU DEV, honest)

    It;s a great suggestion Adam, thanks for the video too, at the moment i have to admit that I am pinning Ve in a corner and throwing lots of WPMU DEV upgrade work at him... but I'll definitely flag this for consideration in the not too distant future, and we could always get in another developer to assist him too.

  • Vladislav
    • Dead Eye Dev

    Hi,

    First of all, thank you very much for the video, it illustrated the feature really well. Actually, the current plugin version (v1.3) has the ability to exclude ads on per-post basis. In plugin settings, under "Advanced", you can opt to display the meta box by setting the "Show post metabox" field to "Yes". Once that is done, you'll have a new meta box in your right bar which you can use to prevent inserting any in-post ads in your post.

    Also, the plugin will add an icon in your editor media bar. Clicking on this icon you'll get a dialog with your created ads, and you can choose which one you wish to insert manually (the shortcode will be created for you).

  • Adam W. Warner
    • Site Builder, Child of Zeus

    Hi James and Ve, thanks for the replies, and if I understand correctly, Ve you're saying I can accomplish what I need, just in a slightly different way:slight_smile:

    Good to know and I'll be whipping up a tutorial video for In Post Ads later today and publishing it on my site. I'll reply here with a link when ready so others can take advantage of it.

    Thanks guys!

  • fh
    • Flash Drive

    Greetings Joe,
    I see it is now possible to hide ads in post, but could it also be made possible for pages? As we want to use this plugin for pages, but want to leave a few many pages, such as the home page out.
    Hope to hear your response!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.