Also, in your examples pls. stay within my Books example: I want to display CPT CFs (custom fields) and not CTs (custom taxonomy), which work very differently in several cases.
===>
Ok - it was just a simple example to demonstrate "wpv_filter_force_template" hook usage.
I honestly dislike this concept, not being able to define multiple CTs by CPT.
===>
Theoretically, you can create as many templates you want to but only assign one template to display with your specific post type or post types, as you are allowed to assign the same template to multiple post types. Please check the following screenshot:
- hidden link
Please check the following Doc:
https://toolset.com/documentation/getting-started-with-toolset/create-templates-to-display-custom-posts/
I'm using Toolset for years and I sill don't understand what exactly is this product and what type of clients is it created for?!
I mean:
- is it a CPT, CT, CF, View etc. management tool or a page builder; is it created for the masses, the non-coder WP admins or the for the coders? It helps to minimize PHP, but what about javascript? Etc.
===>
As you acknowledge that you are using Toolset for years then you would know that Toolset is a package of different plugins where each plugins role is different where:
Toolset Types => Will help you to build the structure like (post types, custom field (post,term), taxonomies, post-relationship)
Toolset Views => To display and list content on frontend (simple list with pagination, sliders, custom search etc..etc)
Toolset Forms => To build frontend forms for post types, users and post-relationship forms
Toolset Maps => To display the maps on frontend and offers distance search
and many more....
Please check the following blog post:
=> https://toolset.com/2019/11/toolset-views-becoming-toolset-blocks/
- In some cases, it helps us to solve complex tasks easily but in another case, it doesn't allow us to decide some very basic settings ( like using multiple CTs by CPT)
===>
If you can clarify exactly where you stuck with views or displaying content template for a single post - then I will be able to guide you in the right direction.
- it doesn't contain such basic features like advanced input fields like searchable multiselect:
hidden link
or
Country / City lists or Currency lists with standard, 3rd party data (eg. Google or OpenStreetMaps) which would really be a huge help!
===>
As you may know Toolset block is still in early life and incremental stage. As you can see with the changelog, those blocks are currently available.
- https://toolset.com/es/download/toolset-blocks/#changelog
We do have plans to add additional lots of features that especially emphasize on the design/layout/responsiveness that will help the users to build the site effectively easy.
However - I encourage you to add feature request for your "advanced input fields" and "Country / City lists or Currency lists" suggestions - so our Devs can review:
=> https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
So if I can't have multiple CT per CPT, I - and I think others - would like to use Block Editor to edit the content inside a View and I don' want to compulsorily use the sole CPT CT of that CPT.
===>
Please check the following blog post where Dario Shared a few videos that might be helpful to you understand how you can design single template for post type, post type archive and views using blocks:
- https://toolset.com/2019/12/learn-how-to-build-templates-archives-and-views-with-blocks/