• Resolved maddobs

    (@maddobs)


    Hello Dear Advanced Ads Support,

    whenever I use a shortcode of an Ad I created and implement it into my content manually, it works properly.

    However, when I use Auto Injection via Placements with Advanced Ads, I guess this PHP function is applied “too late”, because then another shortcode action thats supposed to be triggered early within my Ad doesnt work anymore.

    So my question is: How can I edit the priority, or the WP Hook for the Auto Injection of Ads via your plugin in order to implement the ad injection on an earlier state of the PHP site generation?

    Regards

    Matthias

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Henning

    (@henningaa)

    Hi Matthias,

    Thanks for reaching out.

    So my question is: How can I edit the priority, or the WP Hook for the Auto Injection of Ads via your plugin in order to implement the ad injection on an earlier state of the PHP site generation?

    You’ll find the general settings that can impact the post injection under Advanced Ads > Settings > General > Content Injection.

    I suggest trying the priority of the injection setting, finding the point where your first shortcode can still be executed. Many plugins and themes use a priority between 1 and 20 for their injections, so when trying to find the right value, start with 10 or 20.

    Please let me know if you need anything else.

    Best regards,
    Henning

    Thread Starter maddobs

    (@maddobs)

    Thanks a lot. It worked (I just needed to put it to 98 instead of 100) – however now the page loads waaaaay longer. Any idea why? Regards

    Plugin Support Henning

    (@henningaa)

    Hi Matthias,
    Thanks for the prompt reply.

    now the page loads waaaaay longer

    Without looking into the behavior and knowing what exactly causing the issue, it’s hard to tell. The delay might come from the used ad script, caching or the nesting of shortcodes. In the worst case, from all these factors together.

    I recommend this article about how to measure and optimize page speed and identifying bottlenecks.

    In addition, please also see the manual about using WP Rocket with Advanced Ads.

    Best regards,
    Henning

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Priority (WP Hook) of Ad Insertion’ is closed to new replies.