WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Template
This theme has no available custom post templates. (6 posts)

  1. pnuker
    Member
    Posted 3 years ago #

    I've set up a template & added the code:

    <?php
    /*
    Template Name Posts: Snarfer
    */
    ?>

    at the top, and just copied the single.php over to it.

    When I go to make a new post, I just get "This theme has no available custom post templates."

    How do I get this to work?

  2. Simon Wheatley
    Code for the People
    Plugin Author

    Posted 2 years ago #

    I've just tried doing pasting your code above into a new template, I'm using WordPress 3.2.1 and the TwentyEleven theme, and everything works as expected.

    One note is that the custom post templates must have the correct header, like the example below, and be in the same directory as the index.php template file for the theme, (i.e. not in any sub-directory/sub-folder of the theme).

    Hope this helps.

  3. ashbryant
    Member
    Posted 2 years ago #

    Hi Simon,

    I too am running 3.2.1 & can't seem to get it to work any more. the template is in the root of the theme dir, where it has work flawlessly before.

    If i manually add the details to the custom fields it does work. It just looks like it can't see any templates when it searches through.

    Any ideas why this might be?

    Thanks

  4. Simon Wheatley
    Code for the People
    Plugin Author

    Posted 2 years ago #

    @ashbryant – What theme are you using? Do regular page templates work if you put them in the same place as the custom post templates?

  5. ashbryant
    Member
    Posted 2 years ago #

    it's a custom theme, but it has worked fine for the past 3 years with no changes to it. All other theme files work fine. The only change has been WP itself.

  6. Simon Wheatley
    Code for the People
    Plugin Author

    Posted 2 years ago #

    Can you put a zip of your theme somewhere and message me on my site (http://www.simonwheatley.co.uk/contact-me/) with a link to download, and I'll take a look, please?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic