need to add custom field in more products

This code will allow you to display the upload form when the product is in the $special_category product category. add_action( ‘woocommerce_before_add_to_cart_form’, ‘display_additional_product_fields’, 9 ); function display_additional_product_fields() { global $product; // Product category or slug that will allow the upload field to be displayed. $special_category = 314; if ( ! has_term( $special_category, ‘product_cat’, $product->ID ) ) … Read more

Hide woocommerce category name from specific pages

Let’s assume you have a custom page with the name/title “Hello”. and add the following code to your themes functions.php or you can also create your own plugin. Code snippet: function my_custom_page_category_hide(){ $page_title = $wp_query->post->post_title; if($page_title==”Hello”){ echo ‘<style> .box-text-inner { display: none !important; } </style>’; } } add_action( ‘wp_head’, ‘my_custom_page_category_hide’ ); Just paste the above … Read more

Hide woocommerce category name from specific pages

Let’s assume you have a custom page with the name/title “Hello”. and add the following code to your themes functions.php or you can also create your own plugin. Code snippet: function my_custom_page_category_hide(){ $page_title = $wp_query->post->post_title; if($page_title==”Hello”){ echo ‘<style> .box-text-inner { display: none !important; } </style>’; } } add_action( ‘wp_head’, ‘my_custom_page_category_hide’ ); Just paste the above … Read more