get_calendar()

获取一个日历表

描述

WordPress模板函数get_calendar用于输出日历,如果某天有发表文章,点击该日期可以到达该日期归档页面。

用法

get_calendar( boolean $initial = true, boolean $echo = true )

函数参数

$initial

布尔值,默认值:true

如果为false,则显示为本地化的日期

$echo

布尔值,默认值:true

如果为false,则只返回结果,不直接输出。

扩展阅读

get_calendar()函数位于:wp-includes/general-template.php

示例

Default Usage

Displays calendar highlighting any dates with posts.

/* ———————————-
* wordpress函数
* ———————————- */

<?php get_calendar(); ?>

Displays Weekday Abbrevations

Display days using one-letter initial only; in 1.5, displays initial based on your WordPress Localization.

/* ———————————-
* wordpress函数
* ———————————- */

<?php get_calendar(true); ?>

历史

添加于 版本: 1.0.0

相关

get_calendar(),
get_day_link(),
get_month_link(),
get_the_date(),
get_the_time(),
get_year_link(),
single_month_title(),
the_date(),
the_date_xml(),
the_modified_date(),
get_the_modified_date(),
the_modified_time(),
get_the_modified_time(),
the_time()

  • 原文:http://codex.wordpress.org/Function_Reference/get_calendar
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索