Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Brandon Brigham
Brandon Brigham
3,716 Points

How do I format only blog posts in WordPress?

Hello,

So I'm trying to format just the blog posts in a particular way on this site using CSS but I can't figure out how

This is the site:

http://8de.db2.myftpupload.com/

How do I do this without creating changes to everything else on the site? I don't want to have to go into every single post and style it.

Thanks for your help!

Find the common classes and target those, it may take awhile to get the right specificity, if you only want it on one page find the parent class that is unique and target the common child classes like this:

.parent-class .child-class {
    //styles
}

If you google how to style wp blogs there will probably be an article that shows the right class names just double check it matches yours as different themes and wp versions will have different doms.