Precious version 4.0.1 comes with the ability to use custom Single Templates, just like you can have Custom Page Templates.

You can use this feature if you need a slightly different setup on single posts in a special category, a special tag etc, etc.

How to create a Custom Single Template for Precious

  1. Open the single.php template file found in the precious directory.
  2. Edit the file to your needs
  3. Save file as single-something.php

How to use a Custom Single Template

Before you can make use of your Custom Single Template you need to upload it to either (1) Precious’ theme directory or (2) the directory of the Child Theme you are using on your site.

If you use option (1) the Custom Single Template can be used on any Child Theme of Precious.

After uploading the file you need to do the following when when writing/ editing a post:

  1. Screenshot Custom Fields Scroll down to (and open) Custom Fields in your Edit Post window
  2. Put single_template in the Name field
  3. In the Value field you add whatever name gave the Custom Single Template. (In this tutorial the value is something as in single-something.php)
  4. Press Add Custom Field

Notes and tips for using Custom Single Templates

After you have used the Custom Field name for the first time, you’ll be able to select single_template from a dropdown list in Custom Fields.

To make it easy for you to remember the value of Custom Single Template you should save the file with a name that’s describing.

Example: You want to use a Custom Single Template for you blog category Music, you can name the file as single-music.php which again will make the value of single_template to music.

Want the code?

If want to add this feature to your own theme, feel free to download the code

Questions/ Feedback?

If have any questions about this feature, feel free to add a comment below.