Products filtered by attribute display differently

If I click on a product attribute on an item in our shop to display all items with that attribute, the items display vertically and their size scales to the length of the product name. (E.g. https://maternitysew.wpengine.com/printing_options/a0_wideformat/)

How do I set it so that a filter by attribute looks the same as a filter by category (which is the same as our unfiltered shop)?

Thanks - Erin

Hi Erin,

I can see the class that is responsible for displaying it in columns is missing. See this: https://screencast-o-matic.com/watch/cblVei2avn

Do you have any template customization or any plugin that might change layout? You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. If did not work, try switching from child theme to main X theme. Then check again after that.

If still did not work, please provide, wordpress and FTP credentials on a secure note so we can check closer.

I tried deactivating all plugins (other than Woocommerce) and running the parent theme and the glitch persists.

Hello There,

We could not check your site because the given credentials is not working for us.

Meanwhile, please go to X > Launch > Options > WooCommerce and make sure that you have set the columns for the shop columns. If this is null or empty, this could be the cause of the issue.

Please let us know how it goes.

Sorry, I’ve fixed the login.

I did check the WooCommerce options and they are set to 3 columns.

Thanks - Erin

Hello Erin,

I was able to investigate and this issue happened because you are displaying a product attribute archive which is not covered in the condition in one of the template files. To resolve this, please edit your loop-start.php file in your child theme. You can find it in wp-content/pro-child/woocommerce/loop/. You may update the code and use this instead:

<?php

// =============================================================================
// WOOCOMMERCE/LOOP/LOOP-START.PHP
// -----------------------------------------------------------------------------
// @version 2.0.0
// =============================================================================

?>

<?php $columns      = x_get_option( 'x_woocommerce_shop_columns' ); ?>
<?php $column_class = ( is_shop() || is_product_category() || is_product_tag() ) ? ' cols-' . $columns : ' cols-3'; ?>

<ul class="products<?php echo $column_class; ?>">

I was going to change it and I could not proceed because the given ftp details is not working.

Please let us know how it goes.

The login is SFTP not FTP. I just checked that it works as a login for me as SFTP.

I can’t find a loop-start.php file.

My child theme is at wp-content/themes/pro-child. There’s no woocommerce folder there.

There’s a woocommerce folder in wp-content/plugins/woocommerce but no loop folder.

Thank you - Erin

Hey Erin,

I was able to login to your ftp and resolved the issue right away to save time. I created woocommerce and loop folders. I created also the loop-start.php file and inserted the code. The issue should be fix now.

Please check your site.

Thank you so much for your help!!
I never would have figured out how to resolve this on my own.
Thanks!

You’re most welcome! We’re glad we were able to help you out.
Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.