Apply CSS to specific Post Template?
-
Hello,
I have a book directory website (using Divi) and have decided to build a blog in the main domain, separated from the ‘normal’ content by using a different post template (category, etc)
I have used ACF (Advanced Custom Fields) plugin to create a Post Template, that will be applied to blog posts only, so they look different to the normal content.
I want to apply a different style to the paragraph text in this new Post Template, but (so far as I can tell) the main text in the ACF created post template is simply tagged <p></p> like all the other text on my site.
So I looked at the body tag, to see if I could target a body class along with the paragraph tag, to target it that way.
The body tag looks like this:
<body class="post-template post-template-single-regularpost post-template-single-regularpost-php single single-post postid-463095 single-format-standard logged-in admin-bar no-customize-support et_pb_button_helper_class et_fixed_nav et_show_nav et_pb_show_title et_primary_nav_dropdown_animation_fade et_secondary_nav_dropdown_animation_fade et_header_style_left et_pb_footer_columns1 et_cover_background et_pb_gutter windows et_pb_gutters3 et_right_sidebar et_divi_theme et-db"> <script type="text/javascript">
I can usually ‘guess’ what CSS to use, or find it using trial and error, but I am unable to discover the right format to use.
I assume the class to use would be either ‘
post-template post-template-single-regularpost' or 'post-template-single-regularpost-php
‘But I don’t know how to target: body+body class > paragraph
This is the post I am working on:
- The topic ‘Apply CSS to specific Post Template?’ is closed to new replies.