I think it’s not exactly possible the way you want to achieve. It’s really annoying to not getting a filter there to alter template files names.
I have a workaround on it though. Let use content.php
for the comparison.
1 2 3 4 5 6 7 8 | // content.php file $format = get_post_format(); if( '' != $format ){ get_template_part( 'content-'. $format ); } else{ get_template_part( 'content-default' ); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.