Hi Atma Ram,
I am so sorry about that.
Are you using this plugin?
https://wordpress.org/plugins/ad-inserter/
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 https://wordpress.org/support/topic/ad-appearing-on-top-of-page-when-selected-before-post/
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.