Viewing 14 replies - 1 through 14 (of 14 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hi dicassp,

    Try adding the following snippet to your child theme’s functions.php file:

    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    Thread Starter dicassp

    (@dicassp)

    Hello iCaleb,

    Thank for your answer. It didn’t work ??

    I’ve just noticed that this featured image is also showing on top of my store page. Anyway, I need to take this featured image from the top, I just want it to be shown next to the description, not on the top of the product/store page.

    Another thing, my theme is not compatible with wordpress, so I had to create a third party theme compatibility. Do you think that it might be the reason why this codes are not working when I add to my functions.php?

    Thank you very much for your help

    Thread Starter dicassp

    (@dicassp)

    btw, here are the links with the problems

    single product page

    https://www.dicassaopaulo.com.br/produto/clube-dicas-sp-2/

    shop page

    https://www.dicassaopaulo.com.br/experiencias-em-sp/

    thanks

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hey dicassp,

    Oh, that is something quite different. You want to take this away: https://cld.wthms.co/1fNgn/5VdpPg9s ?

    This is a background image that the product title is on top of. You can take it away with some CSS, but it may look quite silly with all the white space. I’m thinking your theme may have an option to disable the background?

    Anyways, here is the custom CSS:

    .woocommerce.single-product .page-title.title-with-bg {
    	background: none !important;
    }

    This css adds in a background color behind it: https://cld.wthms.co/181AL/4rmUMVZD

    .woocommerce.single-product .page-title.title-with-bg {
    	background: none !important;
    	background-color: #333 !important;
    }

    Hope this helps!

    Thread Starter dicassp

    (@dicassp)

    Hi iCaleb,

    Sorry, I thought that image was supposed to be the featured one. Anyway, it worked fine ??

    You are right, it looks silly with all the white space. My theme doesn’t have anything about background. Is there a CSS to take this background space away?

    Another thing, this background image is still showing on the shop page. Can I take that out too? Here is the link:

    https://www.dicassaopaulo.com.br/experiencias-em-sp/

    I would like my shop page to show just the feature images of the produts, like this example below:

    https://www.ecokitty.co.uk/shop/

    Thank you very much for your help.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Seems you picked the wrong theme ??

    Try the following CSS. It removes the background image on shop and on products pages, and reduces the space / makes the page title a dark color: https://cld.wthms.co/16pJu/41aUA1MR

    .woocommerce .page-title.title-with-bg {
    	background: none !important;
    	padding: 10px 0 !important;
    }
    
    .woocommerce .page-title.title-with-bg h1.entry-title {
    	color: #333 !important;
    }
    Thread Starter dicassp

    (@dicassp)

    it worked ??

    yeah, I’ve noticed that I picked the wrong theme.

    thank you very much for your help ??

    Hi Caleb , I have been trying to remove the featured image from one product for a long time, I have spent so many hours trying to find ways to fix this. I am using the divi theme. https://1ee.8c2.myftpupload.com/dietary-supplements/prental-vitamins-minerals/ This is the page as you can see, I uploaded a plain white image into it, I need it completely removed from this product only, I tried to use code that you mentioned in your first response and it crashed my theme. I would appreciate any help. Thank you Janet

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Well, that’s odd. It shouldn’t crash your theme! You must have pasted it somewhere wrong. Did you create a child theme and use the functions.php file? Alternatively, download and install this plugin: https://github.com/woothemes/theme-customisations.

    You can use the theme-customisations/custom/functions.php file to hold your snippet.

    So what you need to do is hide the product image only for a certain product? With my first snippet in the thread, and this conditional: https://codex.www.ads-software.com/Function_Reference/is_single, we should be able to do just that.

    The code will look like this (be sure to replace ‘138’ with thats product’s ID):

    function wc_ninja_hide_product_image() {
    	if ( is_single( '267' ) ) {
    		remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    	}
    }
    add_action( 'wp', 'wc_ninja_hide_product_image' );

    If that doesn’t work, then your theme has already removed the image from that location and hooked it somewhere else. So you may want to contact the theme authors for help.

    Thank You So Much Caleb! I can’t tell you how much I appreciate your help! I’m going to give this a try! Janet

    Caleb – Thank You so much those instructions worked perfectly, the space for the image is still there and causing the product to look awful. Is there some custom css we can do to remove the space for the image? Here is the page https://1ee.8c2.myftpupload.com/dietary-supplements/prental-vitamins-minerals/.

    Thanks !

    Janet

    I was just looking around the website, and it took every image off every product. Not sure what hapened.

    We had to go live on the site, so we changed it back to the gallery and undid what had been done. Im not sure what we did wrong, but every product on the site lost its image and the space was left…

    Here is the link to the new page now that the site has gone live https://www.naturesenergy.com/dietary-supplements/prental-vitamins-minerals/

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘remove feature image from single product’ is closed to new replies.