How to add Page Templates to Post or Custom Post Types

There are three types of Gutentor Page Templates available now.

By default, Gutentor Page Templates or any page templates are available for Pages only.
We have added the ability to add Gutentor Page Templates on any Post type.


First, go to Gutentor Settings


After Setting Go to Editor of enabled check post/post.

If you want to add other Page Templates to any Specific Post type, you can add the following code on your Custom plugin or Child theme.

function gutentor_add_post_type_templates(){
add_filter( 'theme_post_templates', [ gutentor_hooks(), 'gutentor_add_page_template' ] );
add_filter( 'single_template', [ gutentor_hooks(), 'gutentor_redirect_page_template' ] );

Note that theme_post_templates is actually a dynamic theme_{$post_type}_templates filter. The dynamic portion of the hook name, $post_type, refers to the post type supported by the templates. E.g. you can hook into theme_product_templates to filter the list of templates for the product post type.