• masouddarvishi1992

    (@masouddarvishi1992)


    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)
  • Hi @masouddarvishi1992,

    Please note that the files in question are core theme files, and removing them could impact the theme’s normal functionality. To better assist you, could you clarify why you need to remove these files? This will help us understand exactly what you’re aiming to accomplish.

    Kind regards,
    Aradhy ??

    Thread Starter masouddarvishi1992

    (@masouddarvishi1992)

    @bsfaradhy I want this file not to be loaded on blog pages and content!

    This file is related to WooCommerce pages.

    Hi @masouddarvishi1992,

    As of now, there is no direct option to remove the file. This probably can be done with a custom solution. Unfortunately, providing custom code for a specific need is beyond our support. Having said that, I would leave this to the forum if there’s someone who can help by sharing custom code or thoughts.

    Kind regards,
    Aradhy ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.