Template functionality for single.php

  1. Mark Bloomfield


    It'd be great to be able to set templates in the single.php file so that blog articles, not only pages, can be styled according to preset templates.

    Posted: 11 years ago #
  2. Mark


    You mean that you'd like to be able to select a template for a post just like you can set a template for a page? I can see some sense in that. For example if you have normal blog posts, but also recipes, I can imagine that it would be useful to be able to select the template 'recipe' when writing a new recipe.

    On the other hand, those templates will have to be defined by a theme designer anyway. For the theme designer, it is perfectly easy to style posts in a certain category differently (using conditional tags like in_category). For the end user, selecting the right category (recipes, in my example) may be even simpler than selecting a certain template.

    Posted: 11 years ago #
  3. Simon Wheatley
    Code for the People

    I've written a plugin to do just this: Custom Post Template plugin

    Posted: 9 years ago #
  4. Nile Flores
    Yoast Support


    The plugin is a great idea, but I would like to see this considered for also possibly being put into the actual core one day.

    Posted: 8 years ago #
  5. I'm not sure if this will be looked at for core, you'd have to speak to someone like Jane, or a core developer. But in general, I'd agree, if you can do it with a page, why can't you do it posts? - I am aware there are some themes that have created this functionality straight into the theme, which is powerful, but for the time being, you can't go wrong with that plugin! :)

    Posted: 8 years ago #
  6. Jen
    Key Master

    I also recommend Simon's plugin. The functionality is great, but a little niche, so it stays in themes and plugins for now.

    Posted: 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    49 Votes
  • Status

    This is plugin territory