关于WordPress主题开发中的条件判断函数,我们已经了解了不少了。
根据WordPress官方文档,有一个 is_time 函数:
Whether the query is for a specific time.
判断当前的查询是否是一个指定的时间
When an hourly, “minutely”, or “secondly” archive is being displayed.
判断当前页面是否是按小时、分钟、秒归档的页面
看上去非常类似之前介绍的 is_date
if ( is_time() ) {
// 干点啥呢。
}
就是不知道什么样的链接才能路由到 is_time 对应的页面……
-
WordPress函数:_n_loop 在 pot 文件中注册字符串WordPress函数:_n_loop 在 pot 文件中注册字符串
-
WordPress函数:国际化 _nx_noop 在 pot 中注册字符串WordPress函数:国际化 _nx_noop 在 pot 中注册字符串
-
WordPress函数:translate_nooped_plural 翻译并注册字符串WordPress函数:translate_nooped_plural 翻译并注册字符串
-
WordPress 6.5移除区块样板菜单项的方法WordPress 6.5新增的区块样板菜单项,可将不同区块组合成一个新的区块模板,方便重复使用。
-
WordPress做多语言企业网站近期常用小伙伴问追格小编,有没有计划做双语WordPress企业官网主题。
-
WP Multilang WordPress翻译插件WP Multilang插件的主要功能是提供多语言支持,使用户能够创建多语言版本的网站,满足不同语言用户的需求。
暂无评论,抢个沙发...