WordPress.org

Ready to get started?Download WordPress

Forums

Ad Inserter
[resolved] Blocking Ad Inserter? (5 posts)

  1. Jon W
    Member
    Posted 1 year ago #

    Hi

    I love this plugin, but wish to block it on my mobile theme.

    I do not mind how I block it, so long as I can do it.

    I guess there are several options, but I do not know how to implement.

    e.g.

    1. Add a rule to the head section in the mobile theme to stop Ad Inserter.

    2. Add a rule in Ad Inserter to only insert into specific themes (could be the best option?)

    3. Add a rule in the mobile theme to insert blocking shortcodes to all generated posts and pages.

    Or something else maybe?

    Any ideas? Doing as although Adsense looks great on mobile, DFP ads less so, and need to get DFP on my site asap.

    Thanks.

    http://wordpress.org/extend/plugins/ad-inserter/

  2. Jon W
    Member
    Posted 1 year ago #

    Almost did it.

    I deactivated the plugin in WordPress admin and then at the bottom of functions.php added:

    // Include the plugin.php file so you have access to the activate_plugin() function
    require_once(ABSPATH .'/wp-admin/includes/plugin.php');
    // Activate your plugin
    activate_plugin(ABSPATH .'/wp-content/plugins/ad-inserter/ad-inserter.php');

    which I read about here: http://wordpress.stackexchange.com/questions/4041/how-to-activate-plugins-via-code

    But it then activated it globally.....

  3. spacetime
    Member
    Plugin Author

    Posted 1 year ago #

    I will try to find an elegant solution for such requirement.

  4. emcpwns
    Member
    Posted 5 months ago #

    I would really appreciate some kind of mobile specific options for this reason. I have a large banner ad that looks great on a desktop, but on mobile devices it overlaps my sidebar. Right now my website looks terrible on mobile, and I'm sure my mobile bounce rate it going to skyrocket.

  5. spacetime
    Member
    Plugin Author

    Posted 4 months ago #

    OK, it is on the todo list.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic