Shane it is still not working. Rebeca, Line and Gabriela were added on the 30th of September and they should not be showing it. Look at the screenshot hidden link
Here: hidden link
All I want is to show the custom post that were published today, yesterday, yesterday - 1 .... yesterday - 6. For example, today is 6th of Nov, then posts that are added today, the 5th, the 4th .... until the 30th of Oct... then tomorrow all posts on the 30th would be removed from the list... and so on.
I've added to the date query to limit it to the current and the last one month.
What is happening is that the date filter is matching based on the literal day and not the day, year and month.
So i've updated the filter to limit it to the past 7 days of the current and last month and the current year. There might be a case where last months items will show up if today's date is the 26th and the published date of another post is the 26th the last month.
The only way to limit this is to limit it to the current month only so that when the day repeats it doesn't show items from the previous month.
There might be a case where last months items will show up if today's date is the 26th and the published date of another post is the 26th the last month.
The only way to limit this is to limit it to the current month only so that when the day repeats it doesn't show items from the previous month.
Is there any other way? Because I cannot have people from last month to show up in the "new" section.
Also, what happens when the year turns? When we get to Jan 1st 2020? If this is based on the current year, no new custom post from December will show up, am I right?
Correct. This is where it will get a little tricky for us to encompass everything.
There is another workaround but how much post do you want your view to be able to display in total.
The reason is because we can set the view to display the latest 7 posts or latest 12 posts etc. This will solve the issue with the date however if there are 12 new posts created in 1 day and the view can only display 7 then only the 7 newest ones will be displayed.
Working with dates can be a bit tricky. It has to do with the fact that we have to have a choice of OR or AND comparison and not both.
If we could use both then we could say If year is 2020 or 2019 and the month is this month or 1 month in the past.
Please let me know if this clears things up for you.
The thing is that we are constantly getting new clients (new custom post) thus I cannot set a fix number of posts. It's getting a bit too complicated.
What if I leave the query Published date is after or equal to: week:PAST_ONE(1), what would happen? Until what date would the post go to? And would it change next week? Meaning remove the older ones?
Shane, it seems to be working correctly. But let me see if tomorrow, the oldest post will be removed from the list and if the new ones will be added today or tomorrow, ok?
Meanwhile, any reason for the page to move like it does? What I mean is that when the content is loading the page seems to be moving up then after the content shows, it moves back down again. Anyway to keep it fixed? Do you know what I mean? I can make a video if you would like.
" the oldest post will be removed from the list and if the new ones will be added today or tomorrow"
No only posts that are greater than 10 days old will be removed. If you want less time you can put it to 7. So if you create 30 posts today all 30 will show since they are within the 10 day period.
I've also checked the pages and not seeing any jumping at all. Could you record a video for this.