I’m building this site where I can add events as a cpt. These events contain a datepicker field and sort by upcoming dates (and doesn’t show when the date is over). Now I would like to have some events without a date that show when there’s less than 6 ‘actual’ events (containing a date), so there will always be 6 items on the page.
You can’t do this in a single query and you’ll need to do 2 queries, one to get the posts with dates, keep track or how many are displayed and then to a second query to get posts that have no value and limit it to the number of spots you need to fill.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users