view posttypes on the wordpress site

Asked

Viewed 23 times

0

1 answer

1

There are some ways - Wordpress follows a standard for displaying posts. An important point is the hierarchy of pages used by Wordpress, see more here.

But let’s go to the practical examples - I will use post_type as an example cars. - a simple way to test if posts types are available is to access your site’s URL by passing the parameter post_type. Example: localhost/site ?post_type=cars, where cars is your post_type. Or, if permalink settings are different from the default: localhost/site/cars.

If you do not have specific template for your post_type Wordpress will use the Archive.php, if not, it will use the index php.. If you want to create an archive for your post_type just create a new file, in your theme, following the default archive_[post_type]. php, example: Archive-carros.php, and in this file you can customize your layout to present the information as desired.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.