sample

Customizing Sites Using PHP

Toolset Types plugin lets you easily add custom post types, custom fields and custom taxonomy to WordPress sites.

he template part file outputs the different elements that belong to a page. These include standard WordPress fields (such as the post title), navigation, custom fields and taxonomy, comments, and sidebars.

To create a template part for your custom types, start by making a copy of one of the template parts that come with your theme. In the default WordPress themes, template parts are stored in the template-parts folder. You can start from content-page.php or content-single.php and create a copy for your custom post types.

If the custom post type is called “Beer brands” and the slug is “beer-brand,” the template part should be called content-beer-brand.php (or if you are not using template parts, the template will be called single-beer-brand.php).

Slug of the “Beer Brands” on the custom post type editing page
Slug of the “Beer Brands” on the custom post type editing page
When you look at our example template part (content-consultant.php), you will see comments about what each section does. The API functions that you will see include:

sample