DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

One of WpRecipes readers, fahirsch, asked in the forum how to be able to style posts individually and add specific backgrounds. Here’s the answser to fahirsch question.

To be able to style posts individually, you have to edit your single.php file and find the line starting with:

<div class="post">

Simply change this line to:

<div class="post" id="post-<?php the_ID(); ?>">

Once you saved the file, you can style an individual post by using the #post-XXX id:

#post-112 { 
    background: #113355; 

Done! Easy, isn’t it?

Leave a Comment

Your email address will not be published. Required fields are marked *