WordPress Post Templates

4 replies
  • WEB DESIGN
  • |
Can someone tell me how I can create multiple templates for displaying posts in a self hosted Wordpress them?
#post #templates #wordpress
  • Profile picture of the author Istvan Horvath
    You mean custom post templates?
    custom post templates - Google Search
    Signature

    {{ DiscussionBoard.errors[3687930].message }}
    • Profile picture of the author AnniePot
      Thanks Istvan :-)
      {{ DiscussionBoard.errors[3687942].message }}
      • Profile picture of the author AnniePot
        It seems I'm going to have to add a plugin to offer a drop-down to the different post templates. Can you point me to a guide to create this menu without having to resort to a plugin?
        {{ DiscussionBoard.errors[3688175].message }}
        • Profile picture of the author Scoop
          Do you necessarily need this for Wordpress posts (usually things like news updates or blog posts) or pages (static information)?

          There are similarities in the method of creating templates but it depends on what you want to do (e.g., whether you need all posts in a category to have a specific design).

          For page templates you can simply start by copying page.php in the theme folder to another filename of your choice and adapting it as you choose. Then add in tags with the template name at the top, thus:

          <?php
          /*
          Template Name: My Custom Template
          */
          ?>

          When you create or edit a page the template will appear as an option in the editing screen under 'Attributes'. (For newer versions of Wordpress you may have to enable the display of Attributes under 'Screen Options' in the top right hand side of the editing screen.)
          {{ DiscussionBoard.errors[3704054].message }}

Trending Topics