I am trying to create a dynamic template for all custom post types I create. I understand I can put the post type slug in "Template Post Type:" in the header comments of my template but how can I populate this dynamically?
eg. this is how I would like my header comments to work but I obviosuly can't use a variable in the comments .
<?php
$custom_post_types = 'post, page, my_custom_post_type1, my_custom_post_type2';
/**
Template name: Home
Template Post Type: $custom_post_types
*/
?>