Thank you for contacting Toolset support. Do you refer to Content Templates when you mention “can I use toolset to edit the default posts template of my theme?”
You can create Content Templates under Views > Content templates.
You can then either assign that Content template to all Posts, by setting "posts" in the "Usage" section of the Content Template,
or, you can use this Content Template on a single Post Only by assigning it directly from within the Post Edit Screen in the right side Widget Area to your single Post /page
Please let me know if you have further questions regarding the issue mentioned in this Thread
and let me know if the above solution works for you.
If you want to apply different Content Templates created with Views >> for Posts of the different Categories. Then you can use this code to apply different Content Templates to each category’s posts:
function update_my_ct( $post_id ) {
$ct_one = 3847;//replace 3847 with the Content template ID
$ct_two = 3297;//replace 3297 with the Content template ID
if (has_term( 'bcs', 'student-class', $post_id )){
update_post_meta($post_id, '_views_template', $ct_one);
}
elseif (has_term( 'mcs', 'student-class', $post_id )) {
update_post_meta($post_id, '_views_template', $ct_two);
}
}
add_action( 'wp_insert_post', 'update_my_ct', 10 );
==> Please note comments in above code to change your Content Template IDs.
==> Whereas ‘bcs’ and ‘mcs’ will be replaced with your categories slugs.
While creating these Content Templates in Views, do not apply them anywhere (under “Usage” section), since we will apply them through above code. You can copy the above code for multiple terms / categories.