Support » How-To and Troubleshooting » Customizing Single.php

Customizing Single.php

  • 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)
  • i forgot to mention..

    this is for the dynamic single.php, not for the static pages that can be produced in wordpress.

    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:


    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?


    The default format for the template names used with the plugin would be:


    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 :) ).

    do i need to place the call function within header.php (or whereever the category links are located):


    what happen if i use the full urls to link to my categories (for example:


    i have those in my header.php to call the particular category.

    do i still need to use your call function?
    thanks again

    You’re making this harder than you need to. First, something like:


    that is the individual category, can be uniquely “templated” through the functionality WordPress already offers:


    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.

    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.
Skip to toolbar