WordPress.org

Forums

How to make a post template?? (5 posts)

  1. DDT
    Member
    Posted 5 years ago #

    hi,

    How do i make a post template?

    I like to make 3 simple post templates like

    Template A/
    title
    img-L | img-R
    date
    content

    Template B/
    title
    img-Center
    date
    content

    Template C/
    title
    date
    content

    I know how to make the html and then........

    any tips, suggestions??

    regards

  2. MichaelH
    Member
    Posted 5 years ago #

    Review
    Stepping Into Templates
    Template Hierarchy

    Unless you decide to categorize your posts, and use Category Templates or tags and Tag Templates you will need a plugin to use a different template with each post:

    http://wordpress.org/extend/plugins/custom-post-template/
    http://wordpress.org/extend/plugins/single-post-template/

  3. DDT
    Member
    Posted 5 years ago #

    yes tx

    i have got 3 templates a with the template dropdown i am able to choose one of 4.

    But i don't get it how i can make sure an image has a fixed place inside the post template.

    something like replace [%img-L%] with img source x

  4. MichaelH
    Member
    Posted 5 years ago #

    I'm not sure -- maybe someone else can address that.

  5. mike62
    Member
    Posted 5 years ago #

    I use custom fields for this kind of work. You can create custom fields for each of the different types of content in your posts, and have your basic template check for them. So if you have posted an image path to the "imageRight" field, then it inserts the required code for displaying that image on the right. If that custom field is empty, it doesn't show that at all.

    Most of what I know about Custom Fields I learned from Chris Coyier at CSS Tricks. Here's an awesome video tutorial on the subject: http://css-tricks.com/video-screencasts/65-advanced-uses-for-custom-fields-in-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Topic