This error come from a snippet you’ve added to your site, not from the Code Snippets plugin itself. It’s not something we can fix on our end, but if you’re able to identify the snippet causing the issue and post them here, I’d be happy to suggest some fixes.
You should be able to narrow down to specific snippets with this search:
include @line:4
Thanks for your reply
If i search this comes up :
add_action(‘wp_head’, ‘inject_flatsomeiefallback’, 5);
function inject_flatsomeiefallback() {
ob_start();
include ‘wp-content/themes/flatsome/assets/css/ie-fallback.css’;
$atf_css = ob_get_clean();
if ($atf_css != “” ) {
echo ”;
}
}
add_action(‘wp_enqueue_scripts’, ‘remove_flatsomeiefallback’, 101);
function remove_flatsomeiefallback() {
wp_dequeue_style( ‘ie-fallback’ );
wp_deregister_style( ‘ie-fallback’ );
}
Could this be it where the error comes from
Danny
Hi @dantasimport,
Looks like that could be the issue! Unfortunately, it looks like the snippet you posted is a little malformed – I’ve tried to fix it up as best as I can.
The key part is using WP_CONTENT_DIR when attempting to find the path to the theme folder:
add_action( 'wp_head', function () {
ob_start();
include WP_CONTENT_DIR . '/themes/flatsome/assets/css/ie-fallback.css';
$atf_css = ob_get_clean();
if ( $atf_css !== '' ) {
echo '<style>' . $atf_css . '</style>';
}
}, 5 );
add_action( 'wp_enqueue_scripts', function () {
wp_dequeue_style( 'ie-fallback' );
wp_deregister_style( 'ie-fallback' );
}, 101 );