Support » Theme: Storefront » Specific category page display center

  • Resolved sveberes

    (@sveberes)


    Hi, I’m trying to get the category items to be centered. I’m using a short code to have them display on the page which is centered in the block but nothing I try is working. Please help. TIA

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @sveberes

    Since the products are supposed to show in 4 columns, but there are only 2 products, that won’t directly work.

    What’s the shortcode you’re using?

    [product_category category=’mwb_wgm_giftcard’]

    Can I change it from 4 to 2? How much damage will I do? Or how much trouble will that be?

    Try replacing it with this first:

    [product_category category='mwb_wgm_giftcard' columns='2']

    It won’t do “damage” — it will just show 2 products in 2 columns (instead of 2 products in 2 columns plus 2 empty columns).

    Then, to center it, you can add the following CSS code:

    .page-id-878 ul.products {
      text-align: center;
    }
    
    .page-id-878.storefront-full-width-content .site-main ul.products li.product {
      float: none;
      display: inline-block;
      text-align: center;
    }

    Perfect! Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Specific category page display center’ is closed to new replies.