Title: Customizing Single.php
Last modified: August 18, 2016

---

# Customizing Single.php

 *  [firefox](https://wordpress.org/support/users/firefox/)
 * (@firefox)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/)
 * hi,
 * how do you customize a single.php posts/pages for a particular link, such as 
   a category title?
 * for example, if i have dog, cat, and rabbit as my 3 categories, and the viewer
   clicks on the “dog” category link on my sidebar, the single.php for the “dog”
   category shows up.
 * i would like for that particular dog page (single.php) to have its’ own static
   information (such as a picture of a dog and some specific headings and words 
   on top of that single.php only)
 * this would be true for the 2 other category (cat and rabbit).
 * is this customization possible?
 * thanks, much appreciate any info.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312051)
 * Plugins come to the rescue!
 * [http://guff.szub.net/post-templates-by-category/](http://guff.szub.net/post-templates-by-category/)
 *  Thread Starter [firefox](https://wordpress.org/support/users/firefox/)
 * (@firefox)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312052)
 * i forgot to mention..
 * this is for the dynamic single.php, not for the static pages that can be produced
   in wordpress.
 *  Thread Starter [firefox](https://wordpress.org/support/users/firefox/)
 * (@firefox)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312059)
 * thank you very much Kaf.
 * i’m little confused over the instructions.
 * for my 3 categories – dogs, cats, and rabbits, do i create 3 separate customized
   single.php for them and renamed them:
 * dogs-1.php
    cats-2.php rabbits-3.php
 * for each of those, i put their own pictures and whatever else i like to say for
   each animal on the top – before the posts.
 * how do i call them from the category links?
 * thanks
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312061)
 * The default format for the template names used with the plugin would be:
 * single-cat-1.php
    single-cat-2.php single-cat-3.php
 * The numbers represent the category IDs. And no need to provide any links to them.
   If the plugin is active and the template exists for the category, it’s (automatically)
   assigned to any post within that category, much as single.php is for all single
   post pages (well, unless you’re using my plugin `:)` ).
 *  Thread Starter [firefox](https://wordpress.org/support/users/firefox/)
 * (@firefox)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312071)
 * do i need to place the call function within header.php (or whereever the category
   links are located):
 * szub_post_template_by_cat()
 * what happen if i use the full urls to link to my categories (for example:
 * [http://www.thefirefox.com/category/dogs/](http://www.thefirefox.com/category/dogs/)
   
   [http://www.thefirefox.com/category/cats/](http://www.thefirefox.com/category/cats/)
   [http://www.thefirefox.com/category/rabbits/](http://www.thefirefox.com/category/rabbits/)
 * i have those in my header.php to call the particular category.
 * do i still need to use your call function?
    thanks again
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312074)
 * You’re making this harder than you need to. First, something like:
 * [http://www.thefirefox.com/category/dogs/](http://www.thefirefox.com/category/dogs/)
 * that is the individual category, can be uniquely “templated” through the functionality
   WordPress already offers:
 * [http://codex.wordpress.org/Category_Templates](http://codex.wordpress.org/Category_Templates)
 * Now, to ‘template’ posts within that category, you only need to 1. install and
   activate my plugin, then 2. add a template for the category (i.e. single-cat-
   1.php) to your theme’s directory. The plugin takes care of the rest.
 * In other words, you do not need to call any function from the plugin.
 *  Thread Starter [firefox](https://wordpress.org/support/users/firefox/)
 * (@firefox)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312077)
 * ok i’ll run some tests
 * thanks for you instructions

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Customizing Single.php’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [index](https://wordpress.org/support/topic-tag/index/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [single](https://wordpress.org/support/topic-tag/single/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [firefox](https://wordpress.org/support/users/firefox/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/customizing-singlephp/#post-312077)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
