[英]exclude sidebar from specific pages
I want to exclude the sidebar from one more specific page 我想从另外一个特定页面中排除侧边栏
I have this: 我有这个:
<?php if (is_page('Forum')) { } else { ?>
<?php get_sidebars(); ?>
<?php } ?>
But I want to add another page 但我想添加另一页
I tried this: 我尝试了这个:
<?php if (is_page('Forum'), ('Shop') { } else { ?>
<?php if (is_page('Forum','Shop') { } else { ?>
and 和
But none of those seem to work. 但是这些似乎都不起作用。
What is the syntax for this? 这是什么语法?
<?php if (is_page('Forum') || is_page('Shop')) { } else {
You need to use the OR operator to combine two boolean expressions. 您需要使用OR运算符来组合两个布尔表达式。 That is if the page is Forum OR if the page is Shop then...
也就是说,如果页面是论坛,或者页面是商店,则...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.