在 WordPress 主题和插件开发中,条件判断标签(Conditional Tags)是非常重要的,通过条件判断标签,我们可以判断各种情况,从而使用对应的代码等。
基于16个网页-相关网页
All of the Conditional Tags test to see whether a certain condition is met, and then returns either TRUE or FALSE.
所有的条件式标签测试看看是否符合某个条件,然后返回正确或者错误。
The WordPress:Dynamic Menu Highlighting article discusses how to use the conditional tags to enable highlighting of the current page in a menu.
突出动态菜单的文章阐述怎样使用条件式标签,突出菜单中的当前的网页。
If your Theme needs to have even more control over which Template files are used than what is provided in the WordPress: Template Hierarchy, you can use WordPress: Conditional Tags.
如果你的主题需要更多地控制使用的模板文件而不是模板层级中所提供的内容,你可以使用引起条件反应的标签。
应用推荐