Am I missing something? In Post Ads plugin settings don't make sense

Here are my settings:
Here's how an ad looks:
Here's how I think my settings should make the ad look: (button with text of "Become a Sponsor." that links to /contact/advertising/ )

What am I missing?

On a side note, why does the Green Button skin not have a green-colored button ( )?

  • Vladislav


    I am sorry to hear you're having difficulties setting up the plugin. The "Footer text" setting, as indicated in the field description, will appear as a global footer message of sorts, before the link in your ads. Likewise, "Footer link" setting, as indicated in the description, shall "appear as link text", for the link you define for your Ad. In the latest plugin release (v1.3.2, just released), the labels have been updated slightly to make this a but more obvious. The "Green button" style, however, did have an issue, which should also be fixed in the latest release.

  • Clifford P

    I got the update. The green button actually is green now. :slight_smile:
    However, I'm curious not about the text anymore but about the logic behind it. Looking at how's appear, I understand one way to do it -- with the button and h4 links the same link. But my idea of an alternative way to use this is to have some way to integrate an "advertise on this site" sort of thing. For me, I conformed :wink: and just put this as my "footer text":
    <a href="/contact/advertising/">Become a Sponsor</a>
    but then the plugin changed it to:
    <a href=\"/contact/advertising/\">Become a Sponsor</a>
    and the link on-page turns into:"/contact/advertising//"

    So, bottom line, if you let me have a valid, working link there, that'd be sufficient.

  • Clifford P

    1) Yes, this version of the plugin fixes that issue. Thank you.
    2) On both the last and this version, if I enter zero for "Inject first Ad after this many paragraphs", no ads show at all. I was attempting to have it display before the 1st paragraph.
    3) Currently, I only have 2 ads in the settings. It seems the first one I entered is showing up 99% of the time. My settings are to display 3 total, first after 2 paragraphs, then after 5 paragraphs.
    4) Related to #3, this is a long blog post ( ) and only 1 displays, not 2 or 3 total/2 unique.
    5) I tried '[wdca_ad]' (without quotes) in a text widget and nothing displayed. I also tried <?php echo do_shortcode('[wdca_ad]'); ?> and it didn't show up (even after clearing caches).

    Please help me understand all these settings/issues/errors.

    Thank you.

  • Vladislav


    I'm glad the fix worked well for you - let me try to cover the other issues too with some explanations.

    As for the issue #2 (inserting ads before first paragraph), that unfortunately won't work - the plugin, by default, inserts Ads *after* the n items designated by the selector (usually, that's paragraphs - we'll get back to this a bit later). Some workarounds might be inserting your ads manually using the shortcodes, or adding some extra bit of markup (e.g. an empty P) before the actual first paragraph.

    As for the issue #3 - what kind of Ads ordering do you have set in your plugin settings? Setting the order to "Random" should distribute loading of your ads relatively evenly. Also, do you have some sort of caching plugin active?

    As for issue #4 - thank you for sharing the link, it helped immensely to understand what's going on. As I said earlier, the plugin will insert your ads after the n items designated by the selector, which are, by default, paragraphs - first child paragraphs (>p). Your post, as long as it is, has a total of 5 first child paragraphs - to test and see for yourself, try running this in your browser javascript console:


    You can fix this behavior by tweaking your "Elements selector" option in your plugin settings - youu could e.g. try changing it to just "p", or making the plugin count your ULs and OLs too, by setting it to "p,ul,ol" (both without quotes).

    Issue #5 - by default, WordPress text widget doesn't allow either shortcodes, or PHP code. You can get it to display shortcodes in your text widgets relatively easily, by adding this bit of code to your theme's functions.php file:

    add_filter('widget_text', 'do_shortcode');

    Having said that, using the plugin in this way, although possible (just tested), falls a bit outside the plugin scope - it is, after all, named *In* Post Ads. Adding an Ad to widget in this way will have some side effects, which may be non-apparent. First, the Ad in the sidebar won't show on non-singular pages (e.g. archives and such), this is a limitation explicitly set by the plugin. Also, on regular post pages, you'll need to manually spread the rest of your Ads using shortcodes too. This is because when the plugin recognizes an Ad shortcode, it'll assume you know exactly what you want and what you're doing, and won't insert the rest of the Ads for you automatically.

    I hope these explanations and suggestions helped a bit, or at least gave you some insight into how the plugin works and what kind of behavior you can/should expect.

  • Clifford P

    Yes, display is set to 'random - ASC'.
    Yes, I have a caching plugin (can't really turn it off; it's WPEngine). However, if I clear cache, re-load page, clear cache, re-load page, etc., etc. etc., it's like it's the only ad that shows up.
    When I change plugin settings to 'random - DESC', then it's like the 2nd (of 2 total) ad is shown first all the time, for every post. It's like the 'random' setting isn't working when there are 2 ads (I haven't tested it with 3, 4, or more).
    In my opinion, there shouldn't be an ASC or DESC if I select Random.

    I changed from '>p' to 'p,ul,ol' and that worked as I wanted.

    I have the plugin settings to display 3 ads, first is after 2, then after 5. (screenshot: )
    However, even on long posts, it only displays 2 ads. I only have 2 ads total, so I am saying all this to ask you to confirm that it will not display a duplicate on the same page.

    The PHP code I pasted before was put into footer.php, not into a text widget. And it didn't work.
    I added your code to functions.php and added the text widget with the same shortcode ( ) and it still didn't display anything but the widget's title. I took your code out of functions.php, just to see if the shortcode would show up in plain text and it did not even do that. As you can see from the website, I'm using the EduClean theme.

    Yes, I know it's called 'in post ads' plugin, but I think it lends itself very much to more than just 'in post' ad display, especially since it's the only ad plugin from WPMU DEV and since it is a very nicely structured plugin. I tried instead, and it just wasn't ideal. Maybe it had a more robust set of ad groups and display options (e.g. widget, PHP theme code), but overall user-experience is better with your plugin. I asked previously about displaying outside of within post content ( ) and the suggestion/request was received well, like it was a good idea. Obviously, you're the plugin developer and you have your own opinions, but I'm guessing by your quality and scope of plugins that you could make this thing work outside of in-post ads without too much trouble. And that's what I'm requesting. I like how the plugin fills up the space it's in (with the other plugin, I have to tell it how wide to make the advert block), and I like the other settings of this plugin. All I want is a widget (ideal) and/or PHP code to be able to display ads all over the place.

    A great idea from the other plugin is grouping plugins and setting expiration dates (although I don't like that you HAVE to set an expiration date for all ads).

    Thank you VERY much for your help with all this.

  • Vladislav


    Thanks for the feedback - the latest plugin release (v1.3.3, just released) should have a fix for the HTTPS issues, with a cumulative fix from this thread applied as well.

    As for the usage of the plugin outside its (very, very specific) scope, at the moment it's not possible due to coding limitations. I do, however, see your point and, since there already are some custom post type instances defined as Ads, I can see how it would be logical to use them elsewhere as well - starting with other post types. Some of the areas may require significant changes to make it all work properly, but I do believe this would be a good way forward for the plugin.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.