Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #168516

    Hi,

    I seem to be having a problem with using the product_categories shortcode within the layout builder. Whenever I use the standard WP editor, the parameters parse correctly, but when I insert them into a layout builder page, any parameters that I set get ignored.

    For example, using the following short code:

    [product_categories columns="5"]

    If I insert it through the standard WP editor, it will display the product categories across five columns. However, if I use the exact same code in the layout builder, it defaults to four columns.

    This behaviour is the same with all the product_categories parameters (ids, number, columns, etc.).

    Could someone please test this to see if they also experience the same inconsistent behaviour. Is this a known issue? Is there a work-around? Any help would be much appreciated.

    #168621

    Forgot to mention I am using the most up to date versions of WordPress and Enfold (including today’s update).

    #169152

    Can a moderator look into this for me please. It should only take a minute to test.

    Much thanks.

    #169579

    Hi!

    Just an fyi our Queue system goes by oldest posted response in a topic to newest. So when you bump or ask for a topic to get looked at it actually pushes it to the end of our queue.

    With the shortcodes, yes I’m getting the same behavior somewhat. Not sure why but its putting out the correct columns and all parameters are getting read but their is just no supporting css for them.

    Regards,
    Devin

    Edit: I just did some tests and it looks like its actually a shortfall of WooCommerce. The shortcodes behave the same way with any of the WooThemes I tested unless you add in your own class to wrap the shortcode in to change the width of the columns.

    So they do output the same in the visual editor as they do in the advanced layout editor text element on my end but WooCommerce doesn’t provide column information for the theme to use to change the width of the columns to the actual width of those shortcodes.

    • This reply was modified 11 years, 1 month ago by Devin. Reason: Added testing information
    #169684

    Okay, thanks for that.

    Should this be reported to Woo as a bug?

    As far as my situation goes, what are my options then… can I get it to work with some CSS trickery? Any pointers on how to do it?

    Thanks Devin.

    #170110

    If you put the shortcode in a color section with a custom ID filled into the custom ID field you could then target those columns and add your own widths to them.

    Something like this:

    #top #my-custom-wc-products .products .product {
    width: 19.20%;
    }
    #170369

    Ah yes, that seems to work. Thank you Devin.

    For anyone else who may come across this and be interested, you can also wrap the [product_categories columns="5"] in a div and give that an ID directly.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Woocommerce Shortcodes and Layout Builder incompatibilities’ is closed to new replies.