Need simple Wordpress Help

Joalis

Regular Member
Joined
Jan 7, 2020
Messages
203
Reaction score
29
Hello,

In my product page additional info there is dimensions N/A. How to hide it?

4jmw3zD
 
Simple, you just need to open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of it:

/**
* Hides the product's weight and dimension in the single product page.
*/
add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
 
Simple, you just need to open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of it:

/**
* Hides the product's weight and dimension in the single product page.
*/
add_filter( 'wc_product_enable_dimensions_display', '__return_false' );

Can you please check or I do it right? I'm afraid to mess up something when need to add some code

wfuMhcO
 
It is not correct...

Please copy and paste exactly (I am not sure how one can not copy-paste exactly), lol




/**
* Hides the product's weight and dimension in the single product page.
*/
add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
 
You can even skip the commented part and add this line only, it will still do the job:


add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
 
You can even skip the commented part and add this line only, it will still do the job:


add_filter( 'wc_product_enable_dimensions_display', '__return_false' );

Thanks for your time.

Fq0UEsT


I can save it right now yes?
 
You can even skip the commented part and add this line only, it will still do the job:


add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
It dissapered when I open products on my PC, but it still shows when I open on mobile
 
Code:
.class {
    display: none;
}

It dissapered when I open products on my PC, but it still shows when I open on mobile
maybe it's a caching problem.
 
It dissapered when I open products on my PC, but it still shows when I open on mobile
If it got removed, it got removed. Try visiting the same page in incognito mode, and see if makes a difference.
 
Back
Top