Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Heya @amyhowell! One thing that’s good to keep in mind is the difference between a theme and Gutenberg. Your theme is Twenty Twenty-Two. The block editor (code name Gutenberg) is there, regardless of what theme you’re running.

    If you’re talking about using a different template for your category archive pages it’s not yet possible to create category-specific templates in the Site Editor.

    That said, you can manually create individual category templates by first creating a child theme. I recommend the Create Block Theme plugin – select the child theme option. Using a child theme means that your changes will be preserved, even when there’s a new version of the theme and it gets updated.

    After your child theme has been created, look in the Twenty Twenty-Two theme folder called templates.

    Duplicate the file you see there called archive.html.

    Rename the file copy category-slug.html – where slug matches your category’s slug. For example, let’s say you have a category called “Dessert Recipes” with the slug dessert-recipes, your file name for the template you want to apply only to the category archive page for Dessert Recipes would be called category-dessert-recipes.html Make as many of the file as you like, depending on how many categories you want to create templates for.

    Put the new template files into your child theme folder’s templates sub-folder, and upload them to your hosting.

    You should now be able to edit your new category templates in the Site Editor, at Appearance > Editor > Browse All Templates, to make them look how you want.

    In the future, it will likely be possible to create category-specific templates directly within the editor!

    • This reply was modified 2 years, 1 month ago by Kathryn Presner. Reason: clarified a step
    • This reply was modified 2 years, 1 month ago by Kathryn Presner. Reason: another clarification
    Thread Starter Amy Howell

    (@amyhowell)

    @zoonini you are genius. I’ve been looking for this so long and couldn’t find anything. Instructions are clear enough for me and I manage to get it working. Thanks a ton sweetie. You are star!!!

    Moderator Kathryn Presner

    (@zoonini)

    @amyhowell Aw that’s wonderful to hear, I’m so glad – and you’re very welcome! I’ll mark this as resolved, but feel free to start a new thread if you need help with something else!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Category Template in Gutenberg theme’ is closed to new replies.