Templates

This documentation for the Custom post types plugin for WordPress allows you to customize all features.

To get professional support you need to make a donation to get the PRO version of the plugin.

You can add as many taxonomies as you like, as for the native WordPress public taxonomies (categories and tags), if they are registered as public they will be present in the administrative menus and will be reachable from the frontend (taxonomy archive page).

New template using UI

Registering and adding a new template to your WordPress website has never been easier directly from the administration area.

  1. From the “Extend / Manage” menu click on the “Taxonomies” item;
  2. From the “Templates” page at the top click on the “Add template” button;
  3. Choose the post type for which to use the template;
  4. Create the frontend design of the post type using the page builder and shortcodes dedicated to fields and taxonomies;
  5. Click on the “Publish” button;
  6. See the new “Template” in the frontend;

cpt_templates_register

apply_filters( 'cpt_templates_register', $registered_templates )

Filter the registered template data.

Parameters
  • $registered_templatesarray

    Array of registered templates.

Example:

add_filter('cpt_templates_register', function($registered_templates){
    $registered_templates['products'] = [
        'content' => 'The content' // Html content
    ];
    return $registered_templates;
});
This code is an example, add it to theme’s functions.php file or to custom plugin.
*** *******