WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Template
[resolved] Just installed...not showing at all on my Custom Posts (7 posts)

  1. joshuaiz
    Member
    Posted 2 years ago #

    Just installed the latest version, created my custom post templates, uploaded them to the same directory as my theme and I don't get a custom post template dropdown at all on the custom post edit pages.

    No message like "This theme has no available custom post templates." Nada. Nothing.

    The templates are named correctly, etc. Any ideas?

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

  2. Nick McBurney
    Member
    Posted 2 years ago #

    Im having the same issue, works fine on the standard posts but not on custom post types.

    Any ideas?

    thanks
    Nick

  3. Nick McBurney
    Member
    Posted 2 years ago #

    Just need to add this to functions.php

    /**
     * Hooks the WP cpt_post_types filter
     *
     * @param array $post_types An array of post type names that the templates be used by
     * @return array The array of post type names that the templates be used by
     **/
    function my_cpt_post_types( $post_types ) {
        $post_types[] = 'cpt1';
        $post_types[] = 'cpt2';
        return $post_types;
    }
    add_filter( 'cpt_post_types', 'my_cpt_post_types' );

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

  4. Simon Wheatley
    Code for the People
    Plugin Author

    Posted 2 years ago #

    Glad you found that, Nick. That's the way to do it with this plugin.

  5. joshuaiz
    Member
    Posted 2 years ago #

    Sorry for the delayed response...thanks for this - easy as pie!

  6. SM333
    Member
    Posted 1 year ago #

    I'm having a problem now that I upgraded to WP 3.5. The plugin is working great in the regular posts section, but when trying to use them for custom post types, it just gives me a 404 error. It will show up on the side, along with the templates I have made, so I know something is working right with the custom post types. And if I choose the same template from the normal posts section, it shows great.

    Is anyone else getting the same error message? Im sure that Ive coded everything correctly because its working, just not with the custom post types.

    Can someone give me some advice to what is happening? I use this plugin on almost all of my sites, so Im glad I found this out before updating my other sites! But AMAZING plugin though!!!

  7. SM333
    Member
    Posted 1 year ago #

    Nevermind, sorry for the inconvenience. I just realized it was a problem with my permalink structure. I forgot to re-save my permalink structure, so when I did that, everything worked PERFECTLY!!! Thank you so much for this AMAZING plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic