Custom Post Template
How to use for multiple custom post types?? (2 posts)

  1. dotnature
    Posted 4 years ago #

    Great plug-in this should be in the core!

    Anyhow I am using this along with custom post types, I have edited line 48 in custom-post-templates.php but it will only work for 1 custom post type?

    For instance this works for a custom post type called "housekey":

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

    Adding an additional post type does not work, plus adding this removes it from regular posts.

    I have added multiple times , I just do not get it. This does not work

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

    or any variation seems to break it resulting in server error or just not showing up.

    How can I have it show up for 'post' plus multiple customs post names?


  2. dotnature
    Posted 4 years ago #

    You can ignore this I just realized the wordpress by default looks for a custom page name -single.php before single.php.

    Good to know!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Template
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic