Adding Templates for FSE by a Plugin

[ad_1]

Hi,

We would like to support block-based themes in our plugin and as part of the development, we’ve added a group of blocks that now serve as the foundation for complete templates within the site editor (created manually for archive taxonomies). The template for each archive taxonomy is the plugin frontend. We would like to automate the creation of templates so the end-users will get them as part of the plugin installation.

While using regular themes (non block-based), we are using the “archive_template” and “single_template”.

Could anyone please share the best practices for programmatically add site editor templates via a plugin? which filters should be used?

Thanks,

Idan

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer