Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1331148

    Hey,

    I added the “Load more” button below the masonry grid layout.

    Instead of showing the missing portfolio entries, it just randomly picks 8 entries again
    and displays duplicates. I can repeat this infinitely.

    Sadly other forum posts didn’t help much and it seems like none of the plugins cause it.
    This happens in the “Referenzen” masonry.

    Thanks in advance.

    #1331272

    Hey emilconsor,

    Thank you for the inquiry.

    Did you use the masonry query filter in the functions.php file? Please post the login details in the private field so that we can check the site further.

    Best regards,
    Ismael

    #1331274

    Hi Ismael,

    thanks for the response.

    Yeah, the query filter is in the functions.php.

    //exclude current portfolio entry
    add_filter('avia_masonry_entries_query','avia_exclude_current_masonry_item',10, 2);
    
    function avia_exclude_current_masonry_item($query, $params)
    {
    global $wp_query;
    $postid = $wp_query->post->ID;
    
    $query['post__not_in'] = array($postid);
    
    return $query;
    }
    #1331314

    Nevermind,

    the solution was pretty obvious.

    I chose order random, this caused the infnite duplicates. I switched it to order by slug and know the masonry stops once
    all entries are displayed.

    #1331316

    Hi,

    Glad you figured it out and thanks for sharing your solution :)

    Let us know if you have any other questions and enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Masonry Grid "Load more" shoes infinite duplicates’ is closed to new replies.