Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

How To Add Custom Function

Home / Forums / Virtue Theme / How To Add Custom Function

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
January 20, 2019 at 5:43 pm

I want to get rid of the field of Item Quantity selection button from Individual Prod Page. I know I can do it individually within each product editor, but that means I have to edit over 200 products one by one

WooCommerce provides a filter that needs to be placed in the functions.php but my understanding is that this should be done in a child theme?

function quantity_wp_head() {

if ( is_product() ) {
?>
<style type="text/css">.quantity, .buttons_added { width:0; height:0; display: none; visibility: hidden; }</style>
<?php
}
}
add_action( 'wp_head', 'quantity_wp_head' );

I tried to put it into the Custom CSS in Virtue, but it’s not working, I guess because it’s not CSS?

So, do I need Child Theme?

If yes, saw instructions and it says: …for most the main reason of a child theme is to edit/add functions, and to so one must create a functions.php file.

So do I create that file and add that code to it?

  • The forum ‘Virtue Theme’ is closed to new topics and replies.