Custom template for posts (3 posts)

  1. krushinfo
    Posted 7 years ago #


    I've managed custom templates for specific categories by using the category-1.php method.

    What I'm trying to do now is create a custom template for specific posts i.e. for one post I want a different set of links on the sidebar that relate to that specific post.

    Is this possible?

    Please help

  2. Lorelle
    Posted 7 years ago #

    See Conditional Tags in the WordPress Codex, the online manual for WordPress users, for help on doing this in your sidebar.

  3. krushinfo
    Posted 7 years ago #

    Hey Lorelle!

    Thanks for that little tidbit.

    I'm not an expert in PHP but I imagine the call:


    Says to WordPress "if this is post number 17 then bring in some data".

    How do I put this in my code?

    I'd like it to call in a php file for example: blueposts.php

    I'll try and work this out in the meantime so thanks for the heads up!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.