• Resolved DesignTecky

    (@designtecky)


    I found a recomendation to use this css to remove the extra image thumbnail on a product category page and tried to modify it so only product categories would be affected – but it also removes the thumbnails from my blog post archives which I don’t want.

    code:

    .product_category, .excerpt-thumb img {
     display: none;
     }

    Is there css code that would only remove the thumbnail on the product category pages – the product categories are being treated like post archive pages (including in the titles)?

    problem looks like this:

    https://www.ads-software.com/plugins/wordpress-ecommerce/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi @designtecky, hope you’re well today! ??

    Given the above, you could use this to narrow it down to just the product category pages:

    body.tax-product_category .product_category, .excerpt-thumb img {
    display: none;
    }

    Would that work for you?

    Thread Starter DesignTecky

    (@designtecky)

    Hi Davide,
    I appreciate you trying to help with this!

    it is still removing the featured image from my blog post category page with that code – I think both the product category and the post category are treated as archive pages…i am at a loss – i think it is the “excerpt” part of the code that is causing this but I changed my general settings for reading to full text and that didn’t work either – featured images on posts didn’t show in the post category page.

    Is there a way I could use the code you suggest along with other code to overide the thumbnail setting for specific post categories?

    i really appreciate your help! here are the links to my test site that I’ve been working on if that helps.
    product category page :
    https://www.splitsole.ca/store/products/category/cool-stuff/”

    post category page :
    https://www.splitsole.ca/category/artists-corner/”

    thanks again for your efforts!

    Hi @designtecky, sorry I seem to have completely missed the comma in that previous snippet!

    Could you let me know how this works instead?

    body.tax-product_category .excerpt-thumb img {
    display: none;
    }

    Thanks!

    Thread Starter DesignTecky

    (@designtecky)

    that worked perfectly – thank you!

    Hi @designtecky, you’re most welcome, glad to help! Anything else we can to do assist, just let us know. ??

    Cheers!

    Hello, having the same issue on a standard product category page, but not a coder, where exactly would i insert the code and into what php file? Thank you for the assist.

    Thread Starter DesignTecky

    (@designtecky)

    Hi @ibrahima fall

    I put the code into the style.css file on my child theme.

    PS: you should always have a child theme so you don’t have to worry about your modifications being removed when you update the theme.

    good luck

    Thanks for adding that @designtecky!

    One other possible method would be using a plugin like this:
    https://www.ads-software.com/plugins/imporved-simpler-css/

    You can copy-paste CSS code into the box it provides. That’s especially helpful if you’re constantly changing themes.

    Hope that helps! ??

    yes the custom css is a great tool, thank you.
    i am not sure why the code still does not work for me.
    at the top of the product category is the featured image thumbnail of my first product in the category.
    i have this issue in two different themes i am working with.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    Could you please share us your site link so that we can troubleshoot it?

    Regards,
    WPMU DEV

    Oh yes, apologies for the oversight – here is the link on the Twenty Twelve theme. This theme also displays the thumbnail on the product page.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    Thank you for sharing the link.

    To remove the top product image from product category page on the Twenty Twelve theme use the following CSS code.

    body.tax-product_category .entry-header img {
    display: none;
    }

    If you want to also remove it from single product page then instead of the above code use the following CSS code.

    body.tax-product_category .entry-header img,
    body.page-template-default article.product .entry-header img {
    display: none;
    }

    Best Regards,
    WPMU DEV

    This was exactly what was needed. I might need to come back in the future on this matter for other themes, but I’m going with Twenty Twelve on this one and everything is fixed right up.

    Thanks @designtecky for the post; thanks David for the help and simpler CSS referral; thanks WPMU DEV for the code fix and for my preferred wordpress e-commerce plugin. I appreciate your support forums and fast replies very much.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    You are most welcome, if we can be of any further assistance please don’t hesitate to ask ??

    Cheers,
    WPMU DEV

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Remove duplicate image on Product Category’ is closed to new replies.