Filter to Remove Starter Templates Button on Post Types

No results found. Try again with different words?

Search must be at least 3 characters.

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 article helpful?
Did not find a solution? We are here to help you succeed.

Related Docs

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form