Hide product images on some categories

WPPizza – A Restaurant Plugin for WordPress Support General Support Hide product images on some categories

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24298
    Serkan
    Participant

      Hello,

      I am using this shortcode on a static wp-page: [wppizza category=”pasta” noheader=”1″]

      What I have to do to hide the product images on some categories, is there a shortcode attribute available? I could not find anything on forum…. I know we can hide the product images global, but I only want hide them on special categories…

      please help…

      #24309
      Olly
      Admin & Mod

        >is there a shortcode attribute available?
        No.

        Typically, you simply just do not upload an image , if you do not want to show it.
        However, if you have assigned a product to 2 different categories and one is supposed to show the image and the other is not, your options would be to either use css (which would be the simplest way) or you will have to edit the loop template depending on category

        #24310
        Serkan
        Participant

          Hello Olly,

          could you explain please these two parts with examples: “your options would be to either use css (which would be the simplest way) or you will have to edit the loop template depending on category” ?

          How to do with css?, when css is organized global for every categories and what is loop template, please with small step by step examples… I think it would be helpful for other users, too, when you give more details….

          Thanks…

          #24311
          Olly
          Admin & Mod

            first of all i would suggest having a look at the
            faq:s
            https://www.wp-pizza.com/topic/customising-the-css/
            https://www.wp-pizza.com/topic/can-i-edit-the-templates/

            generally, if you want to hide the images for your “desserts” category for example (adjust as required) it would be something like (not tested, but should work)

            
            article.wppizza_menu-desserts > .wppizza-article-img{display:none}
            

            (i assume you know what css is and how css declarations work)

            you’ll find the loop template in “wppizza/templates/”
            (depending on layout you are using you might have to edit either wppizza-loop.php, wppizza-loop-responsive.php, or wppizza-loop-grid.php)
            I would however suggest you use css for this (see above) instead of messing around with those templates!

            #24312
            Olly
            Admin & Mod

              PS: use your browsers element inspector to find out which element(s) have/has what class(es) and/or id’s

              #24313
              Serkan
              Participant

                Thanks for the great explanation, works now…

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The topic ‘Hide product images on some categories’ is closed to new replies.