get_template_part('slug',get_post_format());
get_template_part():根据get_post_format()返回的信息来加载slug开头命名的相应的模板;
get_post_format():获取当前post的分类信息。
例子:
现有模板 content-image.php
那么get_template_part('content',get_post_format());如果当前post分类是image,那么就会调用模板content-image.php;如果返回的post分类模板不存在,那么就会使用默认post模板。