• Resolved jr361202

    (@jr361202)


    I’m trying to use the shortcodes on the homepage to display items.

    [products limit="8" columns="4" orderby="date" order="desc" visibility="featured"]

    Problem is it’s not using the same layout as the shop page uses because the classes are different.

    Shop page layouts use this:

    <ul class="products columns-3">
    <li class="product-category product first">
    </li>
    ........
    </ul>

    But when I use a shortcode it uses:

    <div class="woocommerce columns-4 "><ul class="products columns-4">
    <li class="post-651 product type-product status-publish has-post-thumbnail product_cat-coin-purses-wallets-id-holders product_cat-cambodia-recycled-tire-products first instock featured taxable shipping-taxable purchasable product-type-simple">
    </li>
    ........
    </ul></div>

    Can I use shortcodes to use the StoreFront layout with the shortcodes?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jr361202

    (@jr361202)

    I needed to add “site-main” class to the container of my custom homepage template in case anyone has this problem when making a custom homepage.

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @jr361202 – first of all, this is a Storefront related thread, not WooCommerce.

    Second, I’m not really seeing the problem, both the shortcode and the shop page have a <ul> that has the class products and then a class based on the numbers of columns.

    If you can share a link and maybe some screenshots to what you’re trying to do, that’d be great.

    Thread Starter jr361202

    (@jr361202)

    Yeah, I meant to post this in the Storefront forum… you can move it if you’re able.

    As I mentioned in an earlier reply to myself, I realized that my custom template for homepage wasn’t using the class site-main in the site content container… I soon realized that the styles for the columns to display correctly needed to be in that wrapper by examining the styles and that it had nothing to do with differences in the shortcode markup.

    But thanks for the reply, I appreciate it!

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey there, I can’t move threads over and it’s still not entirely clear what you’re hoping to find on the forum. Could you explain a bit more what you have in mind? Or shall we just mark this as resolved?

    Thread Starter jr361202

    (@jr361202)

    I think I explained pretty well what the problem ended up being in my last post… I already marked it as resolved before your last reply.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured Products Shortcode Not Using Storefront Layouts?’ is closed to new replies.