add different background image to each wordpress posts

WordPress tutorial, add different background image to each wordpress posts. You can change the background images for each wordpress post or change color.  you can change the background color also. Some times this can be doable through CSS also. But here I am going to give you very simple technique.

add different background image to each wordpress posts

Following code you just need to place in your single.php file.

 


if(is_single('17')){
// When Post 17 (ID) is being displayed.

echo "<style>
body{
background: #000 url(images/bgbody.jpg) top center no-repeat;
}</style>";
}

This way you can add the different background image to each wordperss post.

add different background image to each wordpress posts
add different background image to each wordpress posts