Here is the issue,
I have tried 3-4 different method to insert inline ads after several paragraphs under post content ( both using plugins and without plugins) . It works perfectly.
But I noticed that when we use it with speed booster plugin, it has one weird issue.
First of all, based on info available here- https://forum.tagdiv.com/how-to-make-the-site-faster/ , I delete this code from speed booster file to make it work with other plugins:
// disable the plugins if there are incompatible plugins
$active_plugins = get_option('active_plugins');
//print_r($active_plugins);
//die;
foreach ($active_plugins as $active_plugin) {
if (!in_array($active_plugin, $this->allowed_plugins)) {
define('TD_SPEED_BOOSTER_INCOMPATIBLE' , $active_plugin);
return;
}
}
and then move the JS and css file to footer using file ID. It works very well with all other plugins installed on my website. But for this example- let’s consider that I don’t move any other files.
before activating speed booster. Here is how ad looks on my site: https://s30.postimg.org/6gjkrz7cx/ads-1.jpg
you can see that the ad after pragraph-1 is properly aligned to center within post content.
After activating speed booster, here is how it looks- https://s12.postimg.org/8lqlmqmp9/ads-2.jpg
You can notice that the ad leaves the post content and probably get aligned to the center of whole website, not just post content.
On further checking, I noticed that the issue is caused by the following line:
$this->move_style_to_footer_queue('td-theme');
When I delete this line from speed booster, the ads start displaying correctly. But then a new issue arises, the homepage gets broken like this: https://s11.postimg.org/6tk42duer/2017-04-13_14-14-13.jpg
So, either I can run these ads properly but then homepage gets broken or display homepage correctly, then ads gets misaligned.
I do want to use speed booster for optimisation purpose. So, please look into the issue and see if anything can be done.
Thank you.
-
This topic was modified 9 years by
Nano.
Hi,
Please leave the Speedboster code the way it was, and do not remove the line of code from it. Then we will inspect the ad problem where it occurs and try to give you a solution. Maybe it can be fixed in a different way. The ads inserted using the theme options display properly inside the post content. If a plugin is used to insert the ads, this most likely has it’s own settings regarding ad positioning, and it’s own styling disregarding the ones defined within the theme.
Thanks
Hi Simon, As I have said, I tried this with and without plugins and also with and without any ad positioning customisations, but nothing helped.
Currently, I have disabled the ad inserter plugin and have inserted three ads within paragraph by writing ad codes under functions.php as I have explained here: https://forum.tagdiv.com/topic/possibility-to-add-multiple-inline-ads-after-multiple-paragraphs-within-content/
Now, I have removed all the customisations from speeedbooster and it’s currently with default configuration and hence inactive ( because if I don’t remove those codes, it disables the speedbooster plugin automatically due to expected conflict)
I have also sent the login credentials at contact@tagdiv.com so that you can check internally.
Please help me resolve this issue. Thank you.
@nano2408
Had the same issue with the matched content ads.
I have resolved it by adding conditional CSS
https://forum.tagdiv.com/topic/google-matched-content-widget/
Hi Amit,
Thank you for commenting.
Though in use case scenario, I hadn’t use google’s native matched content but my ad units were responsive as well. So, the solution might be similar for both of them.
I checked your thread, but wasn’t sure where is the final code? Have you have updated the first message with the right code where you have first mentioned the issue? Please write the final working code at the end of your thread.
Thank you.
