• Resolved siutek

    (@siutek)


    Hi,
    I am using the Newest Products block to display recently added products on the homepage. However, some products need to have an additional css class because of their metadata. How can I do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Sérgio L. a11n

    (@csnlima)

    Hey @siutek,

    To help us diagnose what may going on, would you mind sending us more details?

    If needed, you can share a full and uncropped screenshot of what you’re seeing. I’d recommend using:?https://snipboard.io/

    Best,

    Thread Starter siutek

    (@siutek)

    Hi @csnlima, I have some products that have specific information in the metadata. Based on this, I am adding an additional CSS class to them in the product list (e.g. on the home page). If I display the products via shortcode [products] then in /woocommerce/template files I can add the appropriate class.
    But I can’t do it using Gutenberg blocks “newest products” or “best selling products”

    Below is a graphical description of what I need.
    https://snipboard.io/tTAO6j.jpg

    André

    (@chiape)

    Hi @siutek

    Have you, by chance, tried to add a class on that block by setting it up on the Advanced field of the block settings?

    After adding a block, you can click on it to open the Block Settings, and on the right-sidebar, locate the Advanced tab, which will let you add a CSS class to that block, or multiple classes, separating them by spacing.

    https://snipboard.io/70BauO.jpg

    Let us know how it goes! All the best!

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello @siutek,

    We haven’t heard from you in a while. I hope you were able to solve the issue – I’ll mark this topic as resolved.

    Feel free to start a new topic if you need additional help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Newest Products block custom css class in some products’ is closed to new replies.