Skip to main content
2 of 4
Added code
Arete
  • 318
  • 1
  • 3
  • 18

Custom post formats only in single

I want to use custom post types to style video posts differently. This should be quite easily achieved with custom post types.

But I only want the custom post type to affect the post when it is in "single".

In other words I want the front page to stay as it is but when a video post is clicked on (and single.php is rendered) I want it to be styled differently than regular posts.

How can I achieve this?

I have read a dozen articles about custom post types, but all of them explain how to render CPT on the front page, which is not what I need.

Functions.php

add_theme_support( 'post-formats', array(
    'aside',
    'gallery',
    'image',
    'link',
    'video',
    'quote',
    'link',
    'video',
    'status', 
    'audio', 
    'chat'
) );
Arete
  • 318
  • 1
  • 3
  • 18