I am using woocommerce plugin for wordpress to make an eCommerce website. It is working fine with little bit customization. As I have configured shop page as the default product page so that in that page every product can be seen and a user can buy product from that page. But now I want to use some highlights image for special discount on that item and I just placed all that item just over the products page by posting images in that page. But in order to style that images I used WordPress Page Specific CSS Plugin to write some custom css, but it is strange that in that particular page custom css is not working. Can somebody tell me why this is happening and how to solve this? Any help and suggestions are welcome :)

  • Does your CSS show up on the page? This is different than "Does the CSS work?". I'm asking - does the code itself show up on the page? If it does, you may need to adjust your CSS declarations, depending on where your CSS is being loaded. – Zach Oct 15 '12 at 16:10
  • Nope the css declared on the shop page is not showing but if the same css is declared in other page then it is working there – user159377 Oct 16 '12 at 4:51
  • I don't see anything on that plugin page saying that it supports custom post types. This really should be taken up with the developer of that plugin. – Zach Oct 16 '12 at 12:53

You can add this to your body tag of your current theme <body <?php body_class('class-name'); ?>> and then specifically target the container.

body.post-id #yourdiv { border: 2px solid red; }

Always work for me.


woocommerce has it's own css structure. If you want to style your woocommerce page you can define your custom.css by adding the woocommerce body class, such as for example:

body.woocommerce img { border: 5px solid red; }

then all images on your woocommerce page will have a red border.

The woocommerce page has the body class woocommerce.

Not the answer you're looking for? Browse other questions tagged or ask your own question.