The 2 issues are seen in the preview on the backend when editing the archive. When I view in on the front-end it outputs - 'no items found'
1. For some events I'm selling tickets through WooCommerce. So I made a relation between the product aka - ticket - and the custom type - event - .
Back to the list...:
Some events should display a button 'book tickets'. For the events for which tickets are sold at the venue it should not.
After time place date info, I added a conditional block. It should output the book-tickets-button when the event has a relation to the product. I haven't found a way to use a views shortcode that states: 'is related = true' (if there is let me know) , so I compare the post titles of the product and event. They have to be the same.
In the content template it seems to work fine. How ever in an archive or view only the non-related events are displayed. The related (the ones with the button ) show the complete shortcode of the content template.
2. I have set a query that states
date is a DATE bigger or equal to TODAY()
So it should display only the dates for today or in the future. However it outputs older dates as well. No idea why.. Also the sorting is not working. The events or displayed randomly.
It a mess... I know. I can't figure out what's going on.
I think it would help if I could look at your site to see what you have set up, can I get access?
Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Can you point me to the page with your View where I should be checking this?
I've taken a quick look at your site and tried a couple of things, but I can't see what the problem is. I don't want to break anything (not that it is working very well), so I'm going to take a copy of the site to install locally where I can dig a little deeper.
I update you again a little later with my findings.
I was getting distracted by the new blocks editor for the archive.
The problem with no results being found is actually very simple.
You have a Query Filter for the Datum field that compares it as a date, but date fields are stored as timestamps (numbers) and so the comparison should be as a number. See the screenshot.
Fixing that appears to fix everything, including ordering.
Your other question was about the conditional test for whether there was a related post, for which you've come up with your own solution, comparing the titles of the agenda posts to the related products to see if they are the same.
I didn't test it, but I would say that is a little redundant, you could probably just compare the title of the related post to an empty string. If there is a related post it will be different.