Support

Account

Home Forums General Issues register_post_type()

Solved

register_post_type()

  • I register a new post type and use some acf fields, througts it, and it work very well.

    I just want to know if there a way in the snippet to set the template name and and template post type?

    I konw that I can change it manually throught the wordpress admin, but It will be easier for other users if it’s already checked by default.

    any advice?

  • by default a CPT will use the file single-{$CPT-SLUG}.php as the default template https://developer.wordpress.org/themes/basics/template-hierarchy/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.