• Resolved RobotFX

    (@wattaman)


    Hi,

    Is there a way to display (using shortcodes) products as lists, and to customize their looks not to be the same as they appear on the store page?

    For example, on the homepage (custom page in my case) I am using:

    [products limit="4" columns="2" visibility="featured" ]

    This shows 4 featured products, as described here. What I want is to display these 4 products, but have smaller thumbnails, or remove them entirely for example. I know it can be done using CSS, but I hope it is a way to change the code for this to work. Something like

    [products limit="4" columns="2" visibility="featured" thumbnails="false"]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there!

    I understand you want to modify and add additional parameter on the default [products] shortcode.

    You will need to use custom code and extend the shortcode for your use case. You can check this filter and make your adjustments accordingly:

    apply_filters( 'woocommerce_shortcode_products_query', $query_args, $this->attributes, $this->type );

    This requires involvement from a developer so feel free to check our developer resources portal that can help you get going, so I would recommend you to check it further from here: https://developer.woocommerce.com/

    You can also visit the WooCommerce Community Forum, the WooCommerce FB group, or the #developers channel of our Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Another option is to check our customizations page to hire an expert that can create a custom solution for you: https://woocommerce.com/experts/

    Thank you.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thread Starter RobotFX

    (@wattaman)

    it doesn’t way anything about removing the thumbnails though. Is this possible or I should better stop trying?

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @wattaman

    While WooCommerce doesn’t have built-in functionality to modify product display through shortcodes in the way you’re asking, there are a few ways you can achieve the desired result.

    You can follow the guide shared by @rur165 or use custom CSS to hide the thumbnails or adjust their size. If you’d like to go this route, you can add the following CSS to your theme’s custom CSS section:

    To hide thumbnails:

    .woocommerce ul.products li.product a img {
    display: none;
    }

    To adjust thumbnail size:

    .woocommerce ul.products li.product a img {
    width: 50px; /* Adjust as needed */
    height: auto;
    }

    If you’re not comfortable with CSS or prefer a more straightforward method, you might want to consider hiring a developer to write custom code.

    Unfortunately, custom coding is not something we can assist with directly. However, if you have any further questions on development or custom coding, don’t hesitate to reach out to some of our great resources available for support. Our WooCommerce community is brimming with skilled open-source developers who are active on the following channels:

    I hope this helps! If you have any other questions or need further clarification, please don’t hesitate to ask.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display products as list using shortcodes’ is closed to new replies.