wordpress - unique theme for different pages

2019-09-17 09:38发布

I am new to wordpress. I am trying to build a custon website based on it. I know some php and quite good html \ css \ js. I wanted to know if it's possible to set a uinque theme for different pages?

Thank you!

标签: wordpress
1条回答
看我几分像从前
2楼-- · 2019-09-17 09:52

You can do it programmatically with the header.php files in your theme.

I'd recommend using the Carrington theme framework (http://carringtontheme.com/ - download JAM to just get a blank theme that you can populate). With this framework you can very easily change template files according to page, author, category, tag and other attributes. So you could drop in a different header template that loads different CSS depending on page slug.

I wouldn't go as far as to load separate themes, but if you really want to go that route then you should do child themes and put a filter on option_current_theme so that you can programmatically control the assignment of themes to individual resources.

查看更多
登录 后发表回答