How to set a different layout per category?

Hello,

I’d like to use a different layout for a certain category and the posts in it.

I know I can set it per post using the box titled “Select layout for this specific Post only” in the editor, but I need to set it up so the writer doesn’t have to fiddle with it each time she posts something. Also, I need to set a different layout for the category view.

Is there a way to do this? Thanks for any help!

greg

Hi @greg,

I hope you are well today and thank you for your question.

You can try achieving this by developing a child theme and creating different template files for each category. Find more information about WordPress template files on this page Template Hierarchy | Theme Developer Handbook | WordPress Developer Resources

Best Regards,
Movin

Thank you for your reply, but to be honest I was hoping for something much simpler. This theme allows me to choose a different sidebar layout with a simple drop-down menu on the page edit/post edit screens. I thought there would be a snippet of code that can provide the same functionality on a per category basis.

You are most welcome here :slight_smile:

No this is not simpler as you have to develop custom code in child theme to achieve this.