Skip to main content
tslid's user avatar
tslid's user avatar
tslid's user avatar
tslid
  • Member for 9 years, 6 months
  • Last seen more than 3 years ago
awarded
awarded
awarded
awarded
awarded
awarded
comment
Sorting and limitation with pre_get_posts
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 :)
comment
Sorting and limitation with pre_get_posts
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.
awarded
accepted
awarded
asked
Loading…
comment
Duplicates with WP_Query loop
This is the answer. Only it should be meta_key instead of key but it's working great now. Thank you!
accepted
revised
Duplicates with WP_Query loop
deleted 818 characters in body
Loading…
revised
Duplicates with WP_Query loop
added 1973 characters in body
Loading…
comment
Duplicates with WP_Query loop
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.
comment
Duplicates with WP_Query loop
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'; }
revised
Duplicates with WP_Query loop
added 1599 characters in body
Loading…
comment
Duplicates with WP_Query loop
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.