Cripto
Cripto

Reputation: 3751

How do you modify wordpress css for posts?

So, Im using wordpress.com to run my blog. I have paid for the upgrade with custom css. Now I want to change the formatting of posts that are on the front page. Ive been using the "inspect element" on Chrome, simular to Firebug, to see what class everything has and changing the CSS.

Its been pretty easy other than the posts. Each post, apparently has its own class.

my latest post is of class="post-190"

However, the post before it is class="post-188" etc... How do you write a CSS to include all of the post-##

Upvotes: 1

Views: 102

Answers (2)

swapnesh
swapnesh

Reputation: 26722

From the basic TwentyEleven Wordpress theme let me suppose that you want to add border to this post, the structure of this class is forming from the wp-includes/post-template.php file.

This method is creating the class for this post -- get_post_class()

enter image description here

And then add styling to my content-aside.php page in the template, i hope this is what you are looking for, ley me know if u have an issue.

Upvotes: 0

Musa
Musa

Reputation: 97672

You can use these attribute selectors

[class|=post]
an element whose "class" attribute has a hyphen-separated list of values beginning (from the left) with "post"

[class^=post]
an element whose "class" attribute value begins exactly with the string "post"

Source

Upvotes: 1

Related Questions