FSE – Create different individual templates according to the category

  • Unknown's avatar

    Full Site Editing – Create different individual templates according to the category to which

    Hey people, how are you?

    My name is Patricia Ruiz and I am working with Full Site Editing.

    I wanted to ask you about a specific problem that I have and that I have not found the solution searching on the internet.It’s about Full Site Editing, it’s about individual page templates for blog posts or custom post types.

    My client has an online newspaper with several categories to organize the news. The categories are: “general”, “nutrition”, “reproduction”, “health” and “companies”. He needs each category to have its own template so he can embed a different sidebar in each one. I was able to do this with the file templates, but I couldn’t do it with the individual templates.

    Can I create a different individual template for blog posts depending on the category they belong to?

    I mean, I would like to create an individual template for blog posts in the “general” category, a different one for blog posts in the “nutrition” category, and so on for all the others.

    I have tried these combinations in json, within “customTemplates”:

    single-(name-category).html
    single-(slug-category).html
    single-(name-category)-(slug-category).html

    I have the same problem with the Custom post Type. I need to create an individual template for each category it belongs to, but I haven’t been able to.

    From now, thank you for your attention.

    Kind regards.

  • The topic ‘FSE – Create different individual templates according to the category’ is closed to new replies.