Reputation: 436
I am building a custom theme from scratch for WooCommerce (using the hooks/dev method). I just finished the Shop page and I found out that the select tag filter for the products (filter by price/date/name) is not working. I quickly switched to Twenty Eleven and figured out that I am missing some frontend JS from Woocommerce.
Now I could copy all those Js files that I need but in the assets/js/frontend are a lot of more .js files and I think that I may need them as I am far away from being done with the theme. Copying either the necessary or all the js from the WC plugin folder to my theme JS folder would not be a problem but I feel that this is not the best practice to deal with this issue.
I read somewhere that in order to override the frontend JS from WC you have to dequeue and then enqueue your JS file. Which will work for me, still similar to the copy method, as will have nothing to override (as I am not loading any WC JS) but I will end up with the scrips loaded (as I will queue them).
Am I missing something? There's nothing to cover around this subject. If there's no other way I would simply copy them.
Thank you
Upvotes: 0
Views: 1743
Reputation: 26319
Please be sure that you have wp_head()
and wp_footer()
in your theme's header.php and footer.php respectively. See Theme Development for best practices and standards.
Upvotes: 4