Can't choose my custom post template for a custom post type

Support MB Custom Post Type Can't choose my custom post template for a custom post typeResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30459
    HerbieHerbie
    Participant

    So I made a new custom post type X.

    I also made a new post template for this new post type (a PHP file).

    When I go to my normal posts, this template is available under "Post Attributes".

    I enabled Supports > Page Attributes in the post type settings.

    But when I go to custom post type X, I can't select any template under "X Attributes". All I see is an 'order' field, where I can insert a number.

    I want to be able to select my custom post template for my custom post type created with MetaBox.

    #30463
    Long NguyenLong Nguyen
    Moderator

    Hi Herbie,

    To create templates for the post type, please follow this documentation https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/

    For example:

    <?php
    /*
    Template Name: Full-width layout
    Template Post Type: post, page, event, x-cpt-slug
    */
    // Page code here...
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.