Automatic Drop Cap on Posts
Styles the first letter of every blog post as a large decorative drop cap, without having to switch it on block by block.
Opens WPIDE on
Code
.single-post .wp-block-post-content > p:first-of-type::first-letter,
.single-post .entry-content > p:first-of-type::first-letter {
float: left;
margin: 0.06em 0.12em 0 0;
font-size: 3.6em;
line-height: 0.85;
font-weight: 700;
}
Notes
Selectors cover block themes and most classic themes; adjust them if your theme uses different content classes.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.