Archived topic
Adding padding to .inside-article for custom post type
1 reply · Started by Dmitrii on November 14, 2022
Viewing posts 1–2 of 2
Hi there!
I'm using the following CSS for my regular posts
@media (min-width: 1024px) {
.separate-containers.single-post .inside-article {
padding: 0px 0px 0px 301px;
}
}
How can I replicate it for a custom post type? I've tried applying it to just pages - which works - but I don't want it to affect other auxiliary pages (about us, contact us, etc.)
Hi there,
that CPT has its own body class of: single-wedding-vendors
So we can use that in your CSS like so:
@media (min-width: 1024px) {
.separate-containers:is(.single-post, .single-wedding-vendors) .inside-article {
padding: 0px 0px 0px 301px;
}
}
This archived topic is closed to new replies.