1. 首页
  2. WordPress 函数手册

is_home()

is_home()

确定查询是否针对博客主页。
Determines whether the query is for the blog homepage.

目录锚点:#说明#返回#源码#笔记


说明(Description)

另见函数 is_front_page()


返回(Return)

(bool)如果blog查看主页,则为True,否则为false。


源码(Source)


更新版本 源码位置 使用 被使用
1.5.0 wp-includes/query.php:490 6 3

笔记(Notes)

下面的示例可以在侧边栏中用于在显示博客文章索引时显示不同的内容。

is_home() 为WP2原创文章,链接:https://www.wp2.cn/functions/is_home/