• Resolved ochime

    (@ochime)


    hi there..

    Based on the documentation on this page, I created the shortcode :

    [products limit=”12″ columns=”3″ paginate=”true” attribute=”color” terms=”red” attribute=”size” terms=”xl” attribute=”delivery” terms=”same-day” orderby=”random”]

    But the output result was not as desired. What I want to ask:

    1. How to make a short code with the 3 conditions above.
    2. If it is not possible, is there another way to achieve the same goal?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Saif

    (@babylon1999)

    Hello @ochime,

    But the output result was not as desired. What I want to ask:
    1. How to make a short code with the 3 conditions above.

    Answering your questions, yes you can have more than two parameters in the [products] shortcode.

    I’m not sure what 3 conditions you’re referring to as the one above has 10 parameters.

    If you’re talking about the first three, then here’s how it should be formatted [products limit="12" columns="3" paginate="True"].

    The three parameters above should render 12 products per page and limit the layout to 3 products per row.

    Hope this helps!

    Thread Starter ochime

    (@ochime)

    hi @babylon1999
    thank you for reply

    I’am sorry, it seems that I am not good at explaining.
    Previously I have created a short code that contains 3 attributes like the following example:

    [products limit="12" columns="3" paginate="true" attribute="color" terms="red" attribute="size" terms="xl" attribute="delivery" terms="same-day" orderby="random"]

    See, i have a color, size, and delivery attribute in put to shortcode.

    However the shortcode does not give the correct output. Is the method I used wrong or is it true that the use of 3 attributes at once on the shortcode really can’t? If yes, is there another solution to display a product with 3 attributes in it? Hope it’s easy to understand,
    Thank you

    Hi there @ochime ??

    I’ll loop back to this:

    2. If it is not possible, is there another way to achieve the same goal?

    Thanks for reaching back. From what I understand, you could group all the related products, in the WooCommerce backend, under one special tag.

    Then use the shortcode showcased in scenario number 7 here, for displaying them on the front end.

    I hope that helps, otherwise let us know.

    Thread Starter ochime

    (@ochime)

    Hi @anastas10s

    Sorry just replied to your message.

    I understand, and Thanks for providing a solution.

    But given the (probably) growing number of tag usage in the future, I’m afraid this action will eventually require more power (CPU, RAM, etc.) So, i’m still looking for other ways, for example using queries anything that is lighter in nature.

    Your advice will be used when I hit a dead end.

    Once again, thanks mate!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is it possible to use 2 or more attribute parameters on a shortcode?’ is closed to new replies.