Remove product images from ONE product only (2 posts)

  1. jamesharris90
    Posted 3 years ago #

    I am trying to find a way to hide the image on a product page for 1 product only, If possible I would like to keep the product image on the Shop/Catalogue page but just remove it from the product page?
    If/When the image is hidden I would like to have the content move over to where the image was but again just for one product?
    I know how to do this for ALL products but cannot seem to find a solution to do this for just one individual product?
    Please help?


  2. Roy Ho
    Posted 3 years ago #

    Well you can always check against the product ID. Say your product is ID 200. Then you can write a conditional statement like this.

    if ( $post->ID !== 200 ) {
    // show images
    } else {
    // don't show images

    You may need to put this wrapper in several files as each section is broken into templates. Research this part yourself inside the WooCommerce templates folder.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic