• Resolved robg33

    (@robg33)


    I’m creating a page to display products and entering them to the area on the page using text with short code eg, [product ID: 1234] The problem I have is it keeps putting in the first product created by myself no matter what ID number I use, even if it’s not an ID number for one of my products I still get the same product come up in the space created. I’ve tried creating new products not duplicate ones and started a new page and set the layout for the product and still the same. This is the second time having this problem and woocommerce is beginning to drain my will to live with then endless problems. Can someone please help me as I am stuck.

    Thanks Rob

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi Rob,

    I see a few problems with the formatting of your shortcode that’ll likely fix the issue. It should work if it is formatted as so…

    [products id="1234"]

    Could you try using products instead of just product as well as formatting the arguments as id=”” or sku=”” etc… Let us know if that works!

    Thread Starter robg33

    (@robg33)

    Hi,

    Thanks for the information, the format I was using always worked fine but now not. I’ll try it how you’ve suggested and hopefully this will solve it.

    I’ll let you know how I get on. Thanks again.

    Thread Starter robg33

    (@robg33)

    Ok adding that code gives me multiple products?

    Kenin

    (@kbassart)

    Automattic Happiness Engineer

    Hi Rob,

    Can you please provide us with a bit more information here?

    Can you please link to the page where the shortcode is in use?

    Can you also provide a copy of your System Status Report found under WooCommerce>Status?

    Thread Starter robg33

    (@robg33)

    Yes I’ll add a status report for you. Am I right in thinking by using the short code products instead of product that if you use products it will display all products rather than using product with the individual ID number which means listing each product separately if that makes sense?

    Thank you for your reply

    Rob

    • This reply was modified 6 years, 9 months ago by robg33.
    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @robg33,

    I apologize, I actually made another typo for shortcodes, (facepalm).

    From our docs on shortcodes it should be plural for ids as well, even if you’re just using one product.

    [products ids="1234"]

    I know it used to be singular at some point, but I’m not sure if that is 100% deprecated or not. Let me know what you find with the correct shortcode now with your own product ID used.

    Thread Starter robg33

    (@robg33)

    Love the facepalm bit ?? I’ll try the new short code and let you know how I get on.

    Thanks

    Rob

    • This reply was modified 6 years, 9 months ago by robg33.
    Thread Starter robg33

    (@robg33)

    This has worked but it’s putting products in a row in a line all down the left side of the page. Is there a way to change this or some css I can use to make them 3 products per column eg 1 2 3 then the next 3 below.

    Thanks Rob

    • This reply was modified 6 years, 9 months ago by robg33.
    • This reply was modified 6 years, 9 months ago by robg33.

    Does that same behavior persist if you temporarily switch to a default theme such as Twenty Seventeen or Storefront? If so, then you would need to contact your theme author for resolution.

    Kind regards,

    Kenin

    (@kbassart)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Woocommerce product ID short code not working’ is closed to new replies.