Begin主题侧边栏日期格式修改

May想小修改一下Begin主题,但是一看到php就特别的头疼,在网上百度一番也没有找到答案,就只能自己想办法解决了。

May不太喜欢Begin主题侧边栏的日期显示格式,如下图:文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

侧边栏时期显示格式文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

上面的日期的格式是m/d,如果文章特别多,用户完全不清楚这些文章是否是时新的还是已经过时的。May觉得有必要加上年份,花了1个多小时才找到解决的方法。如果你也是使用的Begin主题,请跟着我接下来的操作:htdocs/wp-content/themes/begin/inc/widgets.php:文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

将widgets.php里面的<?php the_time('m/d') ?>全部更换为:<?php the_time('d/m/Y') ?>,效果图如下:文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

或者你可以根据自己的喜好进行更改哦。文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

日期格式 日期显示
Y年n月j日 2018年11月6日
Y-m-d 2018-11-06
m/d/Y 11/06/2018
d/m/Y 06/11/2018

 文章源自MAY的SEO博客-https://may90.com/building/begin-time.html 文章源自MAY的SEO博客-https://may90.com/building/begin-time.html

  • 我的微信
  • 扫一扫微信,添加好友
  • weinxin
  • 我的微信公众号
  • 关注公众号,了解最新动态
  • weinxin
  • 本文由 发表于 2018年11月6日
  • 转载请务必保留本文链接:https://may90.com/building/begin-time.html
谈谈我对Begin主题的看法 SEO资源

谈谈我对Begin主题的看法

Begin主题算是近些年国内最火的WordPress建站主题了,据说收费用户就已经达到了好几千人,可见这个主题是相当火爆,大家对Begin主题的呼声也是很高的。两年前May就一直在关注Begin主题,...
评论  0  访客  0

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定