How to create category template in Gutenberg WordPress Theme

I’m using default 2022 theme on my WordPress blog. I want to use different templates for different categories. I can’t figure out how to do it. Any tips?

I don’t think there is any way to create a category template and use it from the theme editor. You may have to do some coding if you know how to do it. The problem is in Gutenberg theme which is not controlled by php files but saved in database.

I’m no expert in php coding but I think there is a possibility. First create a template from Theme Editor in the dashboard. Then write some function in function.php to specify a template for specific category. This is just an idea and if it can be done then this is the only way to do. I hope someone can provide you the code.

Duplicate archive.php file and name it category-slug.php, replace slug with your category name all in small letters. Modify category-slug.php file as per your wish.

@Jason Gutenberg theme doesn’t use php files so the old way to achieve this doesn’t work anymore.

@Guru yes you are right I missed that.

I also need to create different layout for different category. I feel so gutted that it can’t be done in Gutenberg blocks theme. I don’t want to use older themes. Does anyone know if they will implement it in the future?