WordPress函数single_month_title()

鱼见海资源网最新教程:

介绍

single_month_title() 用于返回“月”、“年”值,在date.php的archive页面,其他页面不支持。

使用

默认

参数

prefix
(string) (optional) 标题前返回值
Default: None
display
(boolean) (optional) Display the title (TRUE), or return the title to be used in PHP (FALSE).
Default: TRUE

返回

The generated title will be:

prefix + MONTH + prefix + YEAR
If prefix parameter is ‘*’, an example would be:

*February*2004

示例

月份和年换行:

') ?>

December 2004

使用 $my_month 变量
Returns the title, which is assigned to the $my_month variable. The variable’s value is then displayed with the PHP echo command.

文章来源于互联网

© 版权声明
THE END
喜欢就支持一下吧
点赞480 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容