wordpress-tips category image Individual Post Styling

Posted on November 29, 2008 and last modified on May 7th, 2009.

Sometimes it is very handy if you can change the styling for a particular post, but not have to change it for all. I would imagine there may be a plugin available that does this, but to be honest, I haven’t actually looked.
Anyway, one easy way to do it is to take note of the ID for the post you want to style and then apply a bit of styling within the post itself.
To find the ID for the post is easy. You can see it when you are actually writing the post, so just look in your browser address bar and you will see something like the following:

http://jamesict.com/wp-admin/post.php?action=edit&post=96&message=7

The important bit we need is the post=96 [just take note of the number].

And all we have to do is then apply a bit of styling via some quick CSS.

To do this we apply some style tags and throw in whatever CSS changes we choose. I have made a simple background colour change to this post by applying:

#post-96 .entry {background:#BEC3B3;text-align:justify;}

In my CSS, the posts also fall under a class of .entry too, so I have included this in the CSS change.

Related Posts:

CSS Resources

About the author

JamesICT has added 31 posts to this site so far...

Owner/administrator of many sites, including FreshlyPressed.net, James is a website workaholic. Give him a problem to fix and he will not stop until it is completed. Just read his testimonials and it is not hard to see, James is the man when it comes to helping you with your website.

Other posts by

Trackbacks/Pingbacks

  1. [...] Original Source: JamesICT [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>