Tell us what you are trying to do?
I created a concert calendar on WordPress with toolset and elementor, I created artist pages where I inform the artists' concert dates. so that the dates of the concerts are in chronological order I created a value of the numeric meta field for each concert knowing that January 1st is the value 1 and December 31st is the value 365.
Is there a method for WordPress to know what day it is in digital meta and so that it can no longer automatically display concerts with the past date?
I am surprised that you are using a numeric field with the day-of-the-year rather than simply using a date field, in which case you could add a Query Filter to your View to only show posts with a date greater than or equal to TODAY.
In your case you will need to add some code to apply a condition to compare your numeric field with the current day of the year.
In PHP you can generate the current day of the year with
$current_day = date( 'z' ) +1;
So you can use the Views API to add a filter to the View in question, with the wpv_filter_query hook:
I changed my numeric fields to date fields and I admit that it is much simpler. THANKS
I have another problem, I created a relationship between artists and festivals, I would like to know if it is possible to have an archive of the relationship between artist and festival?
On the artist pages I would like to automatically create an archive where the artist has been to a festival (2023, 2022, 2021...).
What you mean be relationship post - do you mean you added the post relationship filter in query filter section of your view?
If you can share screenshot of what post relationship you are taking about and tell me what exactly the issue is, after reviewing the information shared by you, I can guide you in the right direction.
On my artist files: hidden link I have programmed future dates and past dates using the views, I would like to keep the archives of past concerts, how can I do this? Because when I update a festival by changing the dates if I remove the artist-festival relationship: everything disappears and if I keep it, the festival is removed from past dates and put on future dates while the artist does not is more programmed there.
I would like to create an archive of past festivals on the artist files.
I can see the section "Festivals passés" (past) and above that there is a section "Festivals à venir" (future).
Archive is different thing - do you want to create post type archive or you want to keep displaying those posts as archive on the page you shared.
I do not get idea yet what you mean when you change dates what happens. Can you please share step information with simple test post where I should change the date and experience the issue you see and tell me what is your expected result.
I need admin access details as well to review your structure.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.