• Hello,

    Load More button disappears when selecting a category from filter, then if the page is reloaded the button appears… How to fix that please?

    • This topic was modified 11 months, 3 weeks ago by oguido. Reason: webpage added

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    hope you are doing well! ??

    You must add the filters and the product loop into the same element (use a specific class).
    You can see here what I mean.

    After doing that, add this custom code in the functions.php of your theme:

    if( ! function_exists( 'yith_wcan_content_selector' ) ){
        function yith_wcan_content_selector( $selector ){
            $selector = '.your_class';
            return $selector;
        }
        add_filter( 'yith_wcan_content_selector', 'yith_wcan_content_selector' );
    } 

    You need to change ‘your_class’ with the specific class you added to the parent element.

    Have a great day!

    Thread Starter oguido

    (@oguido)

    hello Ivan, thank you for your reply. Unfortunately I’m still getting the same problem. I’ve added this code to the functions.php:

    if( ! function_exists( 'yith_wcan_content_selector' ) ){
        function yith_wcan_content_selector( $selector ){
            $selector = '.products-list #col-mask';
            return $selector;
        }
        add_filter( 'yith_wcan_content_selector', 'yith_wcan_content_selector' );
    } 

    as a selector I had to add “.products-list #col-mask” because that’s the element that’s containing (parent) both the product filter and product loop, but I’m not sure that’s what you were suggesting. Could you please clarify?

    thanks!

    Thread Starter oguido

    (@oguido)

    Also, when the load more button doesn’t show up (and after a reload it does) the product mosaic gets messed in the margins between images (no margin), which again gets corrected after a reload. maybe it comes from the same issue?

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hello there,

    the load more button needs to be reinitialized as soon as filters have been applied. You should talk about that with developers that provide that ajax “Load More” feature.

    By my side, I can say you that they should reinit layout and functions on this JS event.

    $( document ).trigger( 'yith-wcan-ajax-filtered', [
    response,
    ] );

    We remain at your disposal for any further question.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load More button disappears when selecting a category from filter’ is closed to new replies.