Fair enough. Thanks for this great theme!
Or this solution, if you want to edit theme’s own files, and include more filters, like “is_404()”: https://forum.tagdiv.com/topic/disable-ads-on-error-page-and-termsconditionprivacy-policy-in-newspaper-theme/
Messy solution but does the job for a while:
function uniquename_callback($buffer) {
$buffer=str_replace('<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>', '<!-- Ads removed -->', $buffer);
return $buffer;
}
function uniquename_buffer_start() { ob_start("uniquename_callback"); }
function uniquename_buffer_end() { ob_end_flush(); }
if (preg_match('/(noads|nocommercials)\//i', $_SERVER['REQUEST_URI'], $match)) {
add_action('after_setup_theme', 'uniquename_buffer_start');
add_action('shutdown', 'uniquename_buffer_end');
}
Replace “uniquename” with your own string to avoid accidental conflicts. Of course, caching is strongly recommended.
Did that, I forced Speed booster to load anyway, but it still didn’t worked as expected, theme’s own CSS is still frontloaded. Probable a buggy plugin anyway.
I don’t like to mess with the theme’s CSS or functions.php, I prefer to make my own plugins, because I don’t want new problems when I’ll update the theme.
It would be nice if the theme would be optimised, without any hacks or plugins…
Speed Booster v4.7 Status:
Disabled – incompatible plugin detected: akismet/akismet.php
Ok, disabling Akismet…
Speed Booster v4.7 Status:
Disabled – incompatible plugin detected: amr-shortcode-any-widget/amr-shortcode-any-widget.php
I can’t keep disabling plugins just for this one to work. I think it’s easier to correct the theme and move Google Fonts below the fold.
It was indeed the import, not sure why.
Thank you!
And thank you for that suggestion, I’m sure it might be useful sometime.
I’m surprised I’m not getting an answer from someone who works here, by the paid support I was expecting something else, not customers trying to help each other…
This is specifically a theme related problem. Everything works just fine, except transferring the theme settings to the new URL. When is detects the transfer, the theme deactivates itself. Every activation also resets the settings.
I tried to reset the key on BETA subdomain before exporting and transferring the settings to WWW, it still doesn’t work.
Site construit pe BETA.domain.com.
Acum vrem sa-l “lansam” http://WWW.domain.com
Cand facem asta, template-ul se dezactiveaza. Se poate reactiva cu acelasi cod insa nu pierde serarile.
Incercat sa exportam setarile din BETA si sa le incarcam in WWW, fara succes (template-ul e audomat dezactivat la import de setari din BETA in WWW, reactivare inseamna stergere de setari).
Aveti vreo solutie pentru a pastra totusi setarile? S-a muncit ceva la ele.