WordPress:Template Tags/the weekday date

来自站长百科
Xxf3325讨论 | 贡献2008年6月25日 (三) 11:40的版本 (新页面: {{Deprecated}} == Description == Displays the weekday of the current post (e.g. Friday) only if it is different from the weekday of the previous post. This tag must be used within [[Word...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

模板:Deprecated

Description

Displays the weekday of the current post (e.g. Friday) only if it is different from the weekday of the previous post. This tag must be used within WordPress:The Loop.

Replace With

There is one-to one correspondence with another template tag, so to replace, use the_date() as a trigger and the_time() with 'l' (lowercase letter L) as the format string, as shown in this PHP code block:

<?php if(the_date('','','', FALSE)) the_time('l'); ?>

See WordPress:Formatting Date and Time for information on date and time format string use.

Usage

%%% <?php the_weekday_date('before', 'after') ?> %%%

Example

<p>Posts from <?php the_weekday_date('<strong>', '</strong>') ?>:</p>

Parameters

before
(string) Text placed before the tag's output. There is no default.
after
(string) Text placed after the tag's output. There is no default.

Related

模板:Tag Date Tags

模板:PHP Function Tag Footer