我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在WordPress中获得月份名称的前3个字符?

I am creating my WordPress theme... This way I can get the month when the post was published as a string:

<?php the_time('j'); ?>

Now I need only the first 3 characters of this string.

For example: JANUARY should be JAN, APRIL should be APR...

"M - Textual three letters Jan - Dec"

https://codex.wordpress.org/Formatting_Date_and_Time

In that case:

<?php the_time('M'); ?>

Will be ok.

近期文章

  • PHP按包含ID的另一个数组对多维数组进行排序
  • 如何确保用户针对特定帖子仅点击我的投票链接一次?
  • javaScript动态表[关闭]
  • 如何使用transltr api
  • PHP手机验证
  • 修剪mongo对象大小
  • Laravel Many To Many透视表具有多个选择
  • 联系表单中的一些变量问题
  • 如何从数据库获取laravel 5.2中的变量后检索用户名和密码
  • 在Laravel 5.2中刷新页面时失去了会话
  • 分页wordpress中的类别列表
  • Google API PHP“invalid_grant:代码已被兑换”
  • 如何在单个查询中获得两个单独的错误结果
  • 使用file_Get_Contents的正确方法是什么?
  • 在composer上安装Yii composer资产插件
  • 将R向量传递给PHP数组
  • 使用PHP驱动程序在Mongo中使用点符号
  • 选择FTP下载的目标文件夹。 (HTML,jQuery或PHP)
  • 依赖表单输入需要从json文件php加载jquery
  • 发送电子邮件到PHP中从数据库检索到的多个电子邮件地址

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华