Style WordPress Custom Post Type Single Page

There’s at least 3 options to choose from:

You can use the single CPT file name which you can grab from the source code in the body classes or a custom class which can be added directly to the single-cpt.php file or using a functions file with conditional tag.

.single-cpt {
your declarations
}

Or add directly to single-cpt.php file

add_filter( 'body_class', 'wpsites_cpt_body_class' );
function wpsites_cpt_body_class( $classes ) {
   $classes[] = 'your-single-cpt-class';
   return $classes;
}

Or with conditional in functions file

add_filter( 'body_class', 'wpsites_cpt_body_class' );
    function wpsites_cpt_body_class( $classes ) {
if ( is_singular('your-cpt') ) {
       $classes[] = 'your-single-cpt-class';
       return $classes;
    }
}

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş