WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Hide product images on some categories
- AuthorPosts
- 27 December, 2016 at 9:19 pm #24298
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…
28 December, 2016 at 4:51 pm #24309>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 category28 December, 2016 at 5:06 pm #24310Hello 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…
28 December, 2016 at 5:22 pm #24311first 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!28 December, 2016 at 5:24 pm #24312PS: use your browsers element inspector to find out which element(s) have/has what class(es) and/or id’s
28 December, 2016 at 5:28 pm #24313Thanks for the great explanation, works now…
- AuthorPosts
- The topic ‘Hide product images on some categories’ is closed to new replies.