Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下 php 代码选择一个页面并相应地遵循 if 语句:
<?php if (is_home()){ ?> <div class="container clear slidecontainer"> <?php lets_get_slideshow(); ?>
我如何才能if调用所有页面,而不仅仅是本示例中的主页?
if
只需删除您的 if 条件
If 语句用于表示基于某些条件的异常。如果您希望代码在所有条件(在本例中为所有页面)下执行,那么您可以简单地省略 if 语句,因为该规则没有例外。