![](https://i-blog.csdnimg.cn/blog_migrate/90d57743bba9f93aef3052e018c3bce3.png)
js自定义页眉和页脚
Did you ever see WordPress blogs that have a separate header for different categories? In this tutorial we will share a simple snippet that you can use to add custom header, footer, or even sidebar for each WordPress category.
您是否曾经看到WordPress博客具有针对不同类别的单独标题? 在本教程中,我们将共享一个简单的代码段,您可以使用该代码段为每个WordPress类别添加自定义页眉,页脚甚至边栏。
To call a particular header, you will need to open your index.php and replace your normal header code with this one:
要调用特定的标头,您将需要打开index.php并用以下代码替换普通的标头代码:
<?php if (is_category('Blogging')) {
get_header('blogging');
} else {
get_header();
} ?><?php if(is_ca