• Resolved freezay

    (@freezay)


    Hello,

    Could appreciate if anyone could help. It may get a little complicated.

    Background:
    In my Home Page (index.php), I have 2 Categories:

    * Smoking
    * Games

    There are 2 single posts on each category:

    * Smoking
    [single-post]Effects of Smoking
    [single-post]General Smoking
    * Games
    [single-post]Warcraft 3
    [single-post]Warcraft 3 Expansion

    Objective:
    I would like to display the text (e.g. “Smoking Kills”) at the top of my “Smoking” Category AND Single Posts, “Effects Of Smoking” AND “General Smoking” automatically.

    I do NOT want the text “Smoking Kills” to appear in my “GAMES” Category AND single posts, “Warcraft 3” AND “Warcraft 3 Expansion”

    Example:
    This would mean that when someone selects my Single Post, “Effects Of Smoking”

    The system must display the word ‘Smoking Kills’ on top of the post.

    e.g.
    Smoking Kills

    Do you know the effects of smoking? ……………

    Current Accompolishment:
    Currently, I am able to display text “Smoking Kills” when I select the category “Smoking”.

    I used the method:

    http://codex.wordpress.org/Category_Templates

    e.g. Category-8.php (e.g. My Smoking Category is ID #8)

    However, how do I make my single post display “Smoking Kills” as well?

    Possible Suggestions:
    Could I create a single-8.php so that WordPress knows it must load this single post template whenever that post belongs to category ID #8?

    Are there any plugins to this?

    Sorry i’m pretty weak in programming but am willing to try out any solutions given. Hope my explanation was clear.

    Any help would be greatly appreciated.

    Thank you.

    Regards,
    freezay

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

The topic ‘Single Post Templates Based on Category Selected’ is closed to new replies.