Title: A specific template on single.php
Last modified: August 19, 2016

---

# A specific template on single.php

 *  [JohnWinch](https://wordpress.org/support/users/johnwinch/)
 * (@johnwinch)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/a-specific-template-on-singlephp/)
 * Hello,
 * I would like to know if it would be possible to have a specific template on certain
   parts of the blog ? For example, having a different background on index.php and
   single.php ?
 * Thanks you for your help.
 * Best regards,

Viewing 1 replies (of 1 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/a-specific-template-on-singlephp/#post-1654819)
 * yup
 * many ways to do that. easiest being to use variable classed like:
 * where you’re <body> section opens, usually in header.php you can have
    `<body
   <?php body_class(); ?>>`
 * which assigns different body classes based on page, etc which you can use in 
   style.css
 * or `<div class="post" id="post-<?php the_ID(); ?>">`
 * would assign a class of post and an id of post-234 (for example)
 * then in your style.css you can use the specific IDs

Viewing 1 replies (of 1 total)

The topic ‘A specific template on single.php’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/a-specific-template-on-singlephp/#post-1654819)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
