I'm looking for an easy way to add dates to training records. It is displayed as a list in the training sheet but also in another page, with a view that would display the list of dates, sorted in chronological order.
Page Fiche VUE : Formation A :
12/10/21
13/10/21
20/10/21
Page Fiche VUE : Formation B :
14/10/21
15/10/21
Page Agenda VUE
12/10/21 : Formation A
13/10/21 : Formation A
14/10/21 : Formation B
15/10/21 : Formation B
20/10/21 : Formation A
I am unable to display the agenda view by repeating the dates available for each training. On the other hand, I manage to display the list of training courses with the dates
To show the list of all the "Training Dates" on one page, you can create a new post view using the classic views editor. It is not possible to create a standalone view for repeating field group posts, using the blocks editor.
Please go to WP Admin -> Toolset -> Settings -> General and make sure that the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build" is selected for the editing experience.
Next, you can go to WP Admin -> Views -> Add New to create a new view for the "Training Date Entries" (the new post type for the repeating field group).
In the view's settings, you can set the order settings to show the results based on the "Training Dates" field, and in the "Search and Pagination" section, including a new filter to show the results from a selected parent "Training Records" post.
- Yes, from post view, I simply meant the view that shows posts.
> And in view, how use block editor?
- As explained in my previous reply, a view created using the blocks editor, can't show all the repeatable field group entries/posts, which is why for this particular requirement, you'll need to use the classic editor for views.
If you face any difficulty in working with the classic view, you're welcome to share the details of what you've already tried and what is missing.
As an attachment, I took a screenshot of the displayed result (example.jpg) and the configuration of my view
What I'm trying to do is add a search field (filter) above the list, which would allow me to filter on a "taxonomy" field of the post type "training"
My view is done as you explained to me, it works, I have the list, but I cannot use the main post category "training" to filter . Taxonomy "category" is a field of the post type "formation"
From your message, I understand that the taxonomy "category" is attached to the parent post type "formation", but the created view is set to show the child repeating field group posts.
The search filters only work for the fields and taxonomies directly attached to the post type that is being shown through the view.
This means that you can use the search filter for the taxonomy "category" when working with a view to show the "formation" post type, but not in the view for the repeating field group posts.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.