List / Grid view troubles - by mleihs - on WordPress WooCommerce support

This topic has 4 replies, 3 voices, and was last updated 9 years, 8 months ago ago by Eva Kemp

  • Avatar: mleihs
    mleihs
    Participant
    April 8, 2016 at 14:26

    Hi,

    please try the following:

    Visit link [1]
    Take a look at the grid.
    Visit link [2]
    Choose list view.
    Visit link [1] again
    Now the front page uses list view too, thus breaking the layout.

    How to restrict the list view to the shop page?

    Best regards

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    April 8, 2016 at 19:14

    Hello,

    I’ve copied the wp-content/themes/legenda/js/etheme.js file into your child theme directory wp-content/themes/legenda-child/js and added the following code in lines 912-914:

    if (jQuery('.home')){
    jQuery('.home .product-loop').removeClass('products-list').addClass('products-grid');
    }

    and included changed js file in child functions.php using the code:

    add_action( 'wp_enqueue_scripts', 'etheme' );
    function etheme() {
        wp_enqueue_script( 'etheme', get_stylesheet_directory_uri() . '/js/etheme.js' );
    }

    Please clear browser cache and check the site.

    Best regards,
    Jack Richardson.

    Avatar: mleihs
    mleihs
    Participant
    April 9, 2016 at 15:17

    Hi,

    this is great. Thanks a lot!

    Best regards

    Avatar: Eva
    Eva Kemp
    Participant
    April 10, 2016 at 08:52

    Hello,

    You’re welcome.

    Regards,
    Eva Kemp.

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘List / Grid view troubles’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.