WordPress函数get_calendar()日历标签
介绍
get_calendar()是一个WordPress日历标签,可以在 WordPress主题 的任意模板中使用,并不需要在 the_loop 中。
默认会显示当前年月的一个日历,并且会在有日志的日期中带上日期的 date 链接。

使用
<?php get_calendar( $initial, $echo ); ?>
参数
$initial
(boolean) (optional) If true, the day will be displayed using a
one-letter initial; if false, an abbreviation based on your localization
will be used.
Default: True
False - causes "Sunday" to be displayed as "Sun"
True - causes it to be "S"
$echo
(boolean) (optional) Determines whether or not the calendar should be displayed.
Default: True
False - Returns calendar, but does not echo it to screen
True - Echos calendar, but does not return it to a variable
示例
默认使用
显示日历,突出显示任何带帖子的日期。
<?php get_calendar(); ?>
显示工作日缩写
仅使用一个字母的首字母显示天数; 在1.5中,根据您的WordPress本地化显示初始值。
<?php get_calendar(true); ?>
标签 : wordpress主题 , wordpress函数 , WordPress建站
本文版权归原作者所有,转载请注明原文来源出处, WordPress教程网 感谢您的支持!
本文链接: http://www.wpcn.net/814.html
- WordPress手动升级详细步骤
- WordPress手动安全升级
- WordPress后台无插件显示文章和分类ID
- WordPress优化:wp_head和remove_action函数
- query_posts函数把你的wordpress博客变成CMS
- Bootstrap替换WordPress的get_search_form()…
- WordPress 函数:register_sidebar()创建主…
- wp_list_comments()使用回调函数自定义评论…
- WordPress过滤器(Filters):apply_filters和…
- WordPress函数:comments_template(加载评…
- WordPress函数:comment_form( )个性化评论…
- 无处不在的WordPress的主循环
- WordPress 函数do_action()详解和应用举例
- WordPress函数:add_menu_page()后台添加顶…
- WordPress函数:add_theme_page()后台添加设…
- WordPress函数:add_submenu_page()后台为顶…
- WordPress 函数:get_template_part()调用你…
- WordPress函数:load_theme_textdomain()(…
- WordPress 3D旋转彩色标签云
- WordPress文本小工具运行PHP
- WordPress无插件实现主题彩色标签云的N种方…
- WordPress函数:wp_tag_cloud(标签云)详解和…
- WordPress函数:register post type (自定义…
- WordPress使用register_post_type 函数创建…