A Sticky Post 置顶文章 is_sticky() 判断是否为置顶文章. is_sticky(’17′) 判断是否为ID17的置顶文章.
A Post Type is_post_type($post_type) Returns true if the value in $post_type is a valid registered post type. This should not be confused with testing to see if a given post is of a particular post type. Note: this conditional tag became available with Version 3.0. is_post_type(‘book’) Returns true if book is a registered post type.
A Post Type is Hierarchical is_post_type_hierarchical($post_type) Returns true if this $post_type has been set with hierarchical support when registered. Note: This ability was added at Version 3.0. is_post_type_hierarchical(‘book’) Returns true if the book post type was registered as having support for hierarchical.
A Comments Popup 评论的弹出窗口 is_comments_popup() 判断是否为评论的弹出窗口.
Any Page Containing Posts 评论 comments_open() 判断当前淘宝开店文章是否允许评论. pings_open() 判断当前文章是否允许广播(pingback).
A PAGE Page 页面 is_page() 判断是否任何页面. is_page(’42′) 判断是否ID 42的页面. is_page(‘About Me And Joe’) 判断是否标题为”About Me And Joe” 的页面. is_page(‘about-me’) 判断是否别名为 “about-me” 的页面. is_page(array(42,’about-me’,’About Me And Joe’)) 判断是否为 ID 42, 或别名 “about-me”, 或标题 “About Me And Joe” 的页面.
A Date Page 日期归档页 is_date() 判断是否为日期归档页. is_year() 判断是否为按年归档页. is_month() When a monthly archive is being displayed. is_day() 判断是否为按天归档页. is_time() 判断是否按小时, “分钟”, “秒”归档页.
Any Archive Page 归档页 is_archive() 是否归档页.
A Search Result Page 搜索结果页 is_search() 是否搜索页.
A 404 Not Found Page 未找到页面 is_404() 是否404页面.
A Paged Page 分页 is_paged() 判断是否有分页. 需要将 <!–nextpage–> 快速标签插入到文章中才能将文章分成多页.
An Attachment 附件 is_attachment() 判断是否为附件文档. 附件是通过编辑器上传工具上传的图片或其他文件. 附件能显示在相应的页面或模版中.
A Single Page, Single Post or Attachment 独立页面、单篇日志或附件 is_singular() 当is_single(), is_page() 或is_attachment()返回TRUE时,is_singular() 也返回TRUE。. is_singular(‘book’) True when viewing a post of the post type book. Introduced with Version 3.0. is_singular(array( ‘newspaper’, ‘book’ )) True when viewing a post of the post type newspaper or book. Introduced with Version 3.0.
A Syndication is_feed() 网站需要使用RSS订阅时,is_feed()返回TRUE。一般情况下会用到is_feed()标签的是WordPress系统和插件开发人员,普通 WordPress用户很少用到is_feed()标签.
A Trackback 引用通知 is_trackback() 网站需要将WordPress钩子勾入Trackback。一般情况下会用到这个标签的是WordPress系统和插件开发人员,普通WordPress 用户很少用到is_feed()标签.
A Preview 草稿预览 is_preview() 判断文章是否显示在草稿预览模式.
Has An Excerpt 摘要 has_excerpt() 判断当前文章是否有摘要. has_excerpt(’42′) 判断ID42的文章是否有摘要.
Inside The Loop 循环 in_the_loop() 判断目前是否在WordPress主循环中. 该标签适用于插件开发人员, 若目前在WordPress主循环中, 该标签返回TRUE.
Is Sidebar Active 边栏 is_active_sidebar() 检查现有侧边栏是否被激活(是否启用).若侧边栏被启用,is_active_sidebar() 返回TRUE,否则返回FALSE.