here in WordPress i’m going to add a Custom Post Type , named : MultiMedia
i have created a Custom Post Type by CPTUI plugin and also have paste the Code provided by CPTUI from “Get Code” Menu to the 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 i created a multimedia.php in the 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 is working!
       <?php endwhile; ?>
    <?php endif; ?>
   </div> <!-- end #main -->
<?php get_footer(); ?>

the problem is multimedia is not in the DropDown List of templates in NewPost sidebar as were expected

is this the correct way?
help me to fix this
-thanks

Read more here: new "custom post template" cant be load in new post template list


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: