This topic has 4 replies, 2 voices, and was last updated 8 years, 9 months ago ago by Eva Kemp
Hi there.
I have some “dead products” with no price. But instead of not displaying they come up with the text GRATIS/ FREE! This is a killer.
It may just be default WooCommerce. But then I would expect you to contact WooCommerce and find out what to do, so you can help improving your theme.
Thank you very much
Peter
Hello,
Please refer to these articles http://davidjlampe.com/hide-woocommerce-free-price-label/
http://wordpress.stackexchange.com/questions/155841/remove-specific-product-from-shop-in-woocommerce
Regards,
Eva Kemp.
HI again
First link didnt work, and I am unsure about this code, if that will do what I asked?
dd_action( ‘pre_get_posts’, ‘custom_pre_get_posts’ );
function custom_pre_get_posts( $q ) {
if ( ! $q->is_main_query() ) return;
if ( ! $q->is_post_type_archive() ) return;
if ( ! is_admin() && is_shop() ) {
$q->set( ‘tax_query’, array(array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘slug’,
‘terms’ => array( ‘private-clients’, ‘charity’), // Don’t display products in the private-clients category on the shop page
‘operator’ => ‘NOT IN’
)));
}
remove_action( ‘pre_get_posts’, ‘custom_pre_get_posts_query’ );
}
Hello,
Products page is configured by Woocommerce and if you want to modify it or remove some products types then you should ask Woocommerce support for proper code to achieve what you want.
Thank you for understanding.
Regards,
Eva Kemp.
You must be logged in to reply to this topic.Log in/Sign up