• Resolved ArtGoddess

    (@artgoddess)


    Hello, I would like to create a template for a Custom Post Type, with the theme “Twenty Twenty-One”.

    I want to show in the CPT single page, in frontend:

    • the featured image,
    • the main content with a description, and
    • the year.

    And then,

    • Custom Post Types fields, and
    • Custom taxonomies, both values and with links.

    I kindly ask which is the best way to approach this. Do I create…

    • single-my-cpt.php …or…
    • template-parts/content/content-single-my-cpt.php ?

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Kavya Gokul

    (@properlypurple)

    Hey @artgoddess ! IMO the best option would be to make single-my-cpt.php, since you want it to be quite different from the default single.php.

    Just to add here, you’d want to make any such changes in a child theme, so that your changes don’t get removed upon updating the theme. A plugin like this can help a lot in creating your child theme.

    Thread Starter ArtGoddess

    (@artgoddess)

    Thank you very much for your answer. It helps! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Type theme in Twenty Twenty-One’ is closed to new replies.