We have a site with multiple custom post types (created in ACF) in addition to the default post type. Resources, Events, etc.
We have added Archive templates and Single templates for each post type.
In the Archives, we have used a Query block that inherits the query from the url.
When viewing the page in the front-end, it works perfectly and displays the correct posts. In the editor, it loads the default posts, not the custom ones.
For additional information, we used the + default templates for each custom type and appropriate visibility conditions in the Cwicly Themer > Templates.
Step-by-step reproduction instructions:
Please write the steps needed to reproduce the bug.
Create a custom post type (e.g. Resources)
Add some standard posts
Add some custom posts (Resources)
Open Cwicly Themer > Templates
Add a default template for the post type
Add a default template for the custom post type (Resource Archive template)
Edit the Resource Archive template
Add a Query block with inherit from URL enabled with a nested Query Template block
Add some blocks with dynamic content from the custom posts
Note that the query is loading standard post data in the editor preview, not the correct custom posts.
I donât think this could be considered a bug, as we havenât implemented the required logic for an inherited query to show posts from the âcorrectâ post type in the backend.
Nevertheless, your point is valid and we can see a need for this.
With WP 6.7 scheduled for release next month, I took a look at all of the updates and changes to the source for it.
As another starting point for Open Source contribution, I am just highlighting the following code in the WP Query block as this may potentially help with this feature.
Please consider this as a very simple starting point for the conversation.
As soon as you are ready to accept contributions, we will be happy to help with these kinds of features/bugs.