Resolved

Woocommerce shortcode not working

Polestar Theme started by danny weiss Oct 29, 2017 17 replies
danny weiss Oct 29, 2017 · 12:46 pm #8155

Hi folks,

I’m building an ecommerce website and I’m using Polestar, however when I try to add some Woocommerce products using their shortcode on the home page, the theme doesn’t display them correctly. I’m trying to use this shortcode: [products limit=”4″ columns=”4″ orderby=”popularity” on_sale=”true”]. The products are displayed but in no more then 2 columns and I think there’s something in the theme css file preventing it from showing up the way they should. I know this because I’ve tried with a different theme and the shortcode works.
So what should I change in the css? Please help me.

Andrew Misplon Puro Oct 29, 2017 · 1:47 pm #8158

Hi Danny

Thanks for raising this. Polestar has a custom set of WooCommerce styles. Unfortunately, we haven’t added shortcode column styling just yet. There is a column setting for the shop and archive pages found at Customize > Theme Settings > WooCommerce. I’ll do my best to have this problem fixed for you by tomorrow and put out a release of the theme once it’s done.

danny weiss Oct 29, 2017 · 1:50 pm #8159

Hi Andrew,

That would be great, thank you 🙂

Andrew Misplon Puro Oct 29, 2017 · 2:09 pm #8161

Thanks for your understanding. Here is a hotfix release you can try: https://purothemes.com/wp-content/uploads/2017/10/polestar.1.0.13.1.zip.

1. Download the ZIP file your desktop.
2. Switch to any other theme and delete Polestar from Appearance > Themes.
3. Install the ZIP file from Appearance > Themes > Add New > Upload Theme and activate.

Let me know how that goes.

Andrew Misplon Puro Oct 29, 2017 · 2:11 pm #8162

Sorry, one moment. I did the theme build from the incorrect branch. Let me upload a new version.

danny weiss Oct 30, 2017 · 1:00 pm #8166

That’s perfect, the shortcode works now. Thank you!

Andrew Misplon Puro Oct 30, 2017 · 1:56 pm #8167

Super, glad to hear that did the trick. Thanks again for your feedback. If anything else comes up, please, let me know.

All the best.

Cheers

danny weiss Oct 30, 2017 · 3:56 pm #8168

I have one more question: since I use a shortcode for items on sale I noticed that the Sale sign is rectangular. Can I turn this into a circle?

Andrew Misplon Puro Oct 30, 2017 · 4:06 pm #8169

That’s correct, that’s the theme’s styling for the sale tag. You can see that in action in the theme demo: https://demo.purothemes.com/polestar/shop/.

It would take customisation to change that styling to a circle but it can be done. Add to Customize > Additional CSS:

.woocommerce .onsale {
    border-radius: 50%;
    height: 50px;
    padding: 16px 0 0 1px;
    width: 50px;    
}
danny weiss Oct 30, 2017 · 7:49 pm #8174

Works like a charm 🙂
Thank you, Andrew! You have a great theme and fantastic support team, keep up the good work guys!

Andrew Misplon Puro Oct 30, 2017 · 8:02 pm #8175

Awesome 🙂 Glad to hear that did the trick. Thanks for your positive feedback. Glad to hear the theme is working out. Chat soon, cheers.

danny weiss Nov 3, 2017 · 10:05 pm #8196

Hi again,

I just noticed this: after implementing the code above, the sale sign is not centered inside the circle on the product page. Here’s how it looks: https://imgur.com/a/fFHO4

Andrew Misplon Puro Nov 4, 2017 · 5:26 am #8202

Hi, please, change the previous rule to:

.woocommerce .onsale {
    border-radius: 50%;
    height: 50px;
    padding: 16px 0 0 0;
    text-align: center;
    width: 50px;
}
danny weiss Nov 6, 2017 · 4:16 pm #8219

Hi Andrew,

Unfortunately that didn’t solve the issue, maybe it’s a different class in the .css file.

Andrew Misplon Puro Nov 6, 2017 · 4:19 pm #8220

Please, send a link so I can take a look. Thanks.

18 posts