Content templates currently allow us to take full control over the page body, which is amazing.
It would be even more amazing if we could use the same editor and shortcode to include code in the head of the custom post's page.
Why?
- We can add custom Open Graph Data based on types fields
- Automatic Meta Descriptions based on type fields
- Other tags that we can set
I believe this would give us more freedom to create and to create designs that will be more robust.
Thank you
Adrian
To do that you would need to edit the Code of your Theme.
The best is to create a Child Theme and copy the files you need (most likely header.php).
Then, you can insert a Content Template of your Choice anywhere in the Header where it can be displayed or used, using this function:
https://toolset.com/documentation/programmer-reference/views-api/#render_view_template
As an example, if you create a Content Template with ID 10, your code would look like this:
echo render_view_template( 10 );
This would then output the exact content of the Content Template.
The DOC Provides more details about the function.