Adinserter and RankMath

  • I have this website. on which I have activated Rankmath. The Ad is shown on the top of the Page for Homepage, Category Pages, and Tags Pages, While it is shown perfectly in Post Pages.

    Actual: It should show perfectly in All the pages, the same way it is shown in post pages.

    Also, I am looking for ranking my website better so that I can get traffic from Google Search. I have tried many times for this and erased my whole website and started newly. I am not able to find anyway. If I get help in this also I will be very happy.

    • This topic was modified 2 years, 7 months ago by Atma Ram. Reason: Added tags Pages
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Atma Ram,

    I am so sorry about that.

    Are you using this plugin?

    If not, please link us to the plugin you are using so we can test it out on our local install.

    We look forward to helping you.

    Yes. I am using the same plugin.

    Hi there,

    Thanks for the response.

    Would you mind sharing a screen recording /screenshot of how you have configured the insertions for your pages/posts on the plugin’s settings so that we can try to reproduce this on our end?

    I hope to hear back soon.

    Hello Atma Ram,

    We are able to replicate this issue. We have alerted our team and they are taking a look.

    We will get back to you with a fix ASAP.

    I would really appreciate your patience in this matter.

    Thank you.

    Hello Atma Ram,

    We have checked the issue. The plugin is using loop_start hook to insert Ads when before_post option is selected. And in Rank Math, we are using while loop to show the posts data in schema on the Homepage.

    You will have to contact the plugin author and ask them to use the loop_post hook after wp_head.

    add_action( 'wp_head', function() {
        add_action( 'loop_start', function( $query ) {
           // Ad code goes here...
    }, 9999);

    This issue will occur in any plugin which uses WP loop to show the post data.
    The only way you can fix this from Rank Math is by not showing the Blog schema on homepage. Else if Ad inserter plugin has any hook or filter to change the priority of loop_start hook, please let us know and we will see about giving you a customized solution.

    Thank you.

    Thank you Todd,

    I have contacted them on their support forum as this would be a better way to come out for some solution.

    The link is

    Hi Atma,

    Thanks for the follow up.

    That is great, I hope that they will be able to fix this soon.

    Feel free to reach out to us should any other issues come up.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘Adinserter and RankMath’ is closed to new replies.