Create gutenberg block template for custom pods post type
-
Hi, I’ve created a custom post type (projects) (based on posts) with the pods framework.
I use the gutenberg editor with custom ACF blocks and have set a default block template for pages and posts using this code:
$page_default_template = array(
array( 'acf/content-block-entry-header-minimalistic' ),
array( 'acf/content-block-text-introduction' ),
array( 'acf/content-block-text-general' )
);$post_type_object = get_post_type_object( 'post' );
$post_type_object->template = $page_default_template;
$post_type_object = get_post_type_object( 'page' );
$post_type_object->template = $page_default_template;
This works like a charm for pages and posts, but I cannot get this to work for my new custom post type. There seems no post_type_object for projects. When I do a var_dump of get_post_types() there is only the _pods_template post type, no other pods post types or projects post type.
How can I apply the block template to my projects post type?
- You must be logged in to reply to this topic.