【发布时间】:2018-04-20 00:31:34
【问题描述】:
我刚刚开始为我的网站使用自定义帖子类型,并在此自定义帖子类型中的某些页面上使用,例如:
/custom/post-one /custom/后三
我想在标题中显示一些不同的内容。这对于以下页面很容易做到:
if (is_page(array('page-here','page-here','page-here','page-here'))) {
include(TEMPLATEPATH.'/header-red.php');
}
elseif (is_page(array('page-here','page-here','page-here','page-here'))) {
include(TEMPLATEPATH.'/header-blue.php');
}
elseif (is_page(array('page-here'))) {
include(TEMPLATEPATH.'/header-green.php');
}
else {
get_header();
}
我将如何转换我用于普通页面的上述脚本,以在我的自定义帖子类型页面上工作?
【问题讨论】:
标签: php html wordpress custom-wordpress-pages