woocommerce-general-rtl
-
Hi. i tried every method to remove this file from pages and posts. But it does not apply!
<link rel='stylesheet' id='woocommerce-general-rtl-css' href='/wp-content/themes/astra/assets/css/minified/compatibility/woocommerce/woocommerce-grid.min-rtl.css?ver=4.8.3' media='all' />
<style id='woocommerce-general-inline-css'>These two files are related to your theme. Please implement this condition with an update or give me a filter or code to remove it.
I used this code and it didn’t work:
function custom_remove_woocommerce_rtl_styles($styles) {
if (is_singular('post') || is_page()) {
if (isset($styles['woocommerce-general']) && isset($styles['woocommerce-general']['has_rtl']) && $styles['woocommerce-general']['has_rtl']) {
unset($styles['woocommerce-general']);
}
}
return $styles;
}
add_filter('woocommerce_enqueue_styles', 'custom_remove_woocommerce_rtl_styles');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.