wordpress - new "custom post template" cant be load in new post template list -


here in wordpress i'm going add custom post type , named : multimedia
have created custom post type cptui plugin , have paste code provided cptui "get code" menu end of funtion.php :

function cptui_register_my_cpts_multimedia() {  /**  * post type: multimedia.  */  $labels = array(     "name" => __( 'multimedia', '' ),     "singular_name" => __( 'multimedia', '' ),     .     .     .     "attributes" => __( 'multimedia attributes', '' ),     "parent_item_colon" => __( 'parent multimedia:', '' ), );  $args = array(     "label" => __( 'multimedia', '' ),     "labels" => $labels,     .     .     .     "supports" => array( "title", "editor", "thumbnail", "custom-fields" ),     "taxonomies" => array( "category", "post_tag" ), );  register_post_type( "multimedia", $args ); }  add_action( 'init', 'cptui_register_my_cpts_multimedia' ); 

then created multimedia.php in theme folder with:

<?php /* template name posts: multimedia */ ?>  <?php get_header(); ?>    <div class="main">        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>            multimedia post type working!        <?php endwhile; ?>     <?php endif; ?>    </div> <!-- end #main --> <?php get_footer(); ?> 

the problem multimedia not in dropdown list of templates in newpost sidebar expected

is correct way?
me fix this
-thanks

edit code

<?php /* template name posts: multimedia */ ?>



<?php /* template name: multimedia */ ?>

should trick you.
for more information creating own template, go this site or here


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -