|
/ Docs /General/ Filter to Remove Starter Templates Button on Post Types

Filter to Remove Starter Templates Button on Post Types

If you are looking to remove the Starter Templates button visible on the top of the Pages/Posts of your website.

Starter Templates Remove Starter Templates Button

You can insert the following filter in your child theme’s functions.php file (How?) –

You can insert the following filter –

1) To disable the Gutenberg Templates button from all post types.

add_filter( 'ast_block_templates_disable', '__return_true' );

2) To disable the Gutenberg Templates button for Page post type.

add_filter( 'ast_block_templates_disable', function( $default = false ) {
if( isset( $_REQUEST['post_type'] ) && 'page' === $_REQUEST['post_type'] ) {
return true;
}return $default;
} );

Note:

Please add the required code to the functions.php of your child theme.

Refer to this doc on How to Add Custom Code to the Child theme?

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page
Scroll to Top