![]() ![]() Wp_enqueue_script( 'child-understrap-scripts', get_stylesheet_directory_uri(). '/woocommerce/assets/css/woocommerce-layout.css') wp_enqueue_style('woocommerce_layout', plugins_url(). '/woocommerce/assets/css/woocommerce.css') wp_enqueue_style('woocommerce_css', plugins_url(). '/woocommerce/assets/css/woocommerce-smallscreen.css') 2 Answers Sorted by: 20 This is what you could do: 1 - Put the CSS in a separate file and save it in your theme directory. By enqueueing scripts you are telling WordPress about the assets you want to add. If each plugin linked to these assets separately, chaos would ensue and all your JavaScript could stop working. Multiple plugins you have may use jQuery and other shared scripts. ![]() wp_enqueue_style('woocommerce_smallscreen', plugins_url(). Enqueueing is a CMS-friendly way of adding scripts and styles to WordPress websites. add_filter( 'woocommerce_enqueue_styles', '_return_empty_array' ) Not sure why you de-queued WooCommerce styles, but this should solve your problem: // Dequeue Woocommerce Style If ( is_singular() & comments_open() & get_option( 'thread_comments' ) ) and it will be overriden. Wp_enqueue_script( 'popper-scripts', get_template_directory_uri(). Wp_enqueue_style( 'child-understrap-styles', get_stylesheet_directory_uri(). Removes the parent themes stylesheet and scripts from inc/enqueue.phpĪdd_action( 'wp_enqueue_scripts', 'understrap_remove_scripts', 20 ) Īdd_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ) Wp_deregister_script( 'understrap-scripts' ) Wp_dequeue_script( 'understrap-scripts' ) Wp_deregister_style( 'understrap-styles' ) Dequeue Woocommerce StyleĪdd_filter( 'woocommerce_enqueue_styles', '_return_empty_array' ) Right now I have enqueued WooCommerce styles and trying to queue them after my child template but nothing seems to work. I'm trying to avoid use !important to override the WooCommerce styles. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |