Hello,
I would like to display the speakers in the archive page, can you please help me?
Thank you, best regards Ivo
Hello, I see you have a post relationship between Topics and Speakers. In the Topics archive, you would like to display a list of related Speakers. I can help you with this, but unfortunately it is not currently possible to design a View inside a WordPress Archive using the Block Editor. Nested Views are not yet supported in the Block Editor, so you must create them using the older Views editor method.
To set up this type of nested list, you must enable the legacy Views editing experience. Go to Toolset > Settings > General tab and turn on the Editing Experience option that enables both the Block editor and the legacy Views experiences. Refresh the page after changing this setting and go to Toolset > Views to create a new View. In the first popup, choose the option "Display all results" and give the View a name like "Speakers for Topic Archive".
You will see the main View editing screen next. In Content Selection, choose the Speakers post type. Scroll down to the Query Filter section and add a new filter for post relationship / repeatable field group owner. Choose the Topic - Speaker relationship, and choose as related items of the current post in the loop (see query-filter.png for an example).
Scroll down to the Loop Editor area and click "Loop Wizard". This is where you will design the list of Speakers. For testing, I suggest you choose something simple like "Unordered list" and insert the Post Title with Link field - this will allow you to test and confirm the View is working as expected. Save the View.
Return to the WordPress Archive editor for Topics and select the Loop block. Insert a View block in the loop and select the existing Speakers for Topic Archive View. Save the archive and visit the archive to verify the related Speaker results are correct. If so, you can return to the View editor screen and use the Loop Wizard again to design the results of the View as you would like. You can click the button to edit the template using the Block Editor. This will allow you to create the loop design in Blocks. However, you cannot create this design or edit this design directly in the WordPress Archive editor. It can only be edited independently.
Let me know if you have questions about this or if it does not work as expected, and I can give you more advice.
Hello,
Thank you very much for the support. It has partially worked. However, two fields are not displayed: Topics and School level.
hidden link
Could you please help me further?
Thanks a lot.
Best regards
Ivo
However, two fields are not displayed: Topics and School level.
Are these two fields in the Speaker post or in the Topic post? I assume they are both in the Topic post based on the screenshot "Mouse_Highlight_Overlay_und_Notification_Center.jpg". In a View of Speakers, if you want to display custom field information from the parent Topic, you must use the item="@relationship-slug.parent" syntax in the Types field shortcode:
[types field="schulstufe" item="@relationship-slug.parent"][/types]
Replace relationship-slug with the slug of the Topic-Speaker relationship. If you do not include the item attribute, the custom field shortcode expects to display information from the current Speaker post, which is incorrect.
Item attribute documentation: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
Types Field API documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/