Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I forgot to mention only that sorting in ASC order is not working exactly as it supposed but it may be because Im using masonry grid. The date filtration was more important :)
The best thing is that you wrote comments and Im able to understand the code and what is doing. Im truly grateful, thanks a lot @PieterGoosen ! About is_category() - I added this on purpose as Im targeting categories listing too. I used the Y-m-d format but had some struggle with html 5 formatting because the input was in day/month/year but actual query was containing Y-m-d and event field was not accepting the post variable. I managed to fix it and also replaced the query_posts with pre_get_posts as you advised. Everything is perfect now, thanks once again.
Got it. I found where is located but on first sight it it is not creating custom query, it only calling the loop file. I may be wrong but... I posted the code in the first post.
When there are no more posts my infinite scroll is supposed to break, with my original code when I reach the end of the posts I see No More Posts - I guess thats the moment when I go to $has_posts = false; For the infinite scroll I found only this if(is_home() and blt_get_option('enable_infinite_scrolling')){ $output[] = 'infinite-scroll'; }
This is working okay for the first page but as soon as the second one loads it's showing posts without thumbnails. I have updated the first post with full code of my loop and index.php files. Once again thanks for your time - the issue may not be fully solved but Im learning a lot.