Post formats “audio” and “video” only showing in index.php

There is a huge difference between Post Formats and Post Types. I am assuming you are using post formats, which do not have a default template file for you to use.

What you can do though is use has_post_format() to see if the post has the format you are using, and if it does, use get_template_part() to get a specific template file that you created to display there.

For example:

// If this post has a post format of 'video'
if( has_post_format( 'video', $post->ID ) ) {

    // Then get and display 'single-video.php'
    get_template_part( 'single', 'video' );

}

Leave a Comment