Answers for "wordpress how to assign the custom template to custom post type"

PHP
1

wordpress post type template

// ON your wp-content/themes/theme_name ADD:
archive-{post-type-name}.php
// Example: archive-musicians.php
// Inside the file you should copy the archive.php or category.php
Posted by: Guest on December-16-2021
0

What template files are used for our custom post type in wordpress?

there are two files that can be used for our own created custom post type.

the files are:
archive.php
single.php
To use the files we will just have to change the names with our custom post types.

Suppose our custom post type is events,
the files name would be:

archive-events.php
single-events.php
Posted by: Guest on May-13-2021

Code answers related to "wordpress how to assign the custom template to custom post type"

Browse Popular Code Answers by Language