WordPress.org

Ready to get started?Download WordPress

Forums

Custom template for posts (3 posts)

  1. krushinfo
    Member
    Posted 5 years ago #

    Hey,

    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
    k

  2. Lorelle
    Member
    Posted 5 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
    Member
    Posted 5 years ago #

    Hey Lorelle!

    Thanks for that little tidbit.

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

    is_single('17')

    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

Tags

No tags yet.