WordPress.org

Support

Support » Plugins and Hacks » Custom Post Template » [Resolved] Custom Post Templates with Custom Post TYPES in WP 3.0

[Resolved] Custom Post Templates with Custom Post TYPES in WP 3.0

Viewing 8 replies - 1 through 8 (of 8 total)
  • Update on Custom Post Template plugin:

    I have found that if you are using only your custom post type and not the standard post type, then a quick fix is to change ‘post’ in line 48 of custom-post-templates.php (the add_meta_box line) to the name of your post type.

    My configuration doesn’t need to use the standard post types, and I only want custom post templates for my custom post type. I don’t know enough php to make it show up on both at once, but does anyone know how that is done? Here is the line of code:

    $this->add_meta_box( 'select_post_template', __( 'Post Template', 'custom-post-templates' ), 'select_post_template', 'post', 'side', 'default' );

    Thanks!

    Substitute ‘post’ with ‘your custom post type name’.

    Thought I’d chime in and agree with the posters above, I just did this this morning and it works great. Just change ‘post’ to your custom name. Then it shows up on your custom post page and you can select what template you want to use.

    Thanks for posting this solution. I’d really love to see the plugin be programmed to automatically apply to all custom post types. In lieu of that, it’d be cool to also be able to list multiple custom post types, etc.

    Great post! I was looking for this solution for a long time. Thanks!

    Hello,

    Thanks for this great plug-in !

    FYI : You can simply duplicate the n° 48 line to add your custom post typ name.

    $this->add_meta_box( 'select_post_template', __( 'Post Template', 'custom-post-templates' ), 'select_post_template', 'my_custom_post_name', 'side', 'default' );

    I think it will be better to have a simple config on backoffice who list all post type to be active. In this case, a simple loop who get the arry of the post type liste who add a meta box will be usefull.

    Maybe in a future version ?

    Didn’t work for me. Still no dropdown…

    Thanks for the tip. Worked like a charm!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Custom Post Templates with Custom Post TYPES in WP 3.0’ is closed to new replies.
Skip to toolbar