Exclude javascript from optimize
-
Hi,
Thanks for your optimized plugin. I have a problem need your help please.
I have a script something like this: (of course this is not full code but the start of the snippet)<script type="application/ld+json">{"@context":"https://schema.org","@type":"CreativeWorkSeries"
When i added it in the header.php then SGOptimized automaticcly move it to footer then it dupplicated and then one in header and one in footer.
If i move that code to footer, then it will be ok, only one in the footer.
So, now i want to put it in the header.php and exclude it from moving to footer and i use this snippet.add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' ); function js_combine_exclude_inline_script( $exclude_list ) { $exclude_list[] = '<script type="application/ld+json">{"@context":"https://schema.org","@type":"CreativeWorkSeries"'; return $exclude_list; }
But there is no change. Could you please check if i did something wrong?
Thank you so much
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Exclude javascript from optimize’ is closed to new replies.