內容簡介
將節點加入至顯示文章清單的頁面,可在The Loop內使用。輸出日期標頭以分隔文章列表。參閱the_date()
節點文件 以了解用法。
有任何問題?請聯絡我。
已知問題/漏洞
如發現任何問題,請回報。
範例
建立類似以下格式,使用如下語法:
標題:2008年3月
文章:2008年3月15日
文章:2008年3月28日
文章:2008年3月29日
標題:2008年4月
文章:2008年4月1日
文章:2008年4月4日
等等……
新增一個日期標頭:
<?php intermittent_date( 'F Y', '<h3 class="date-header">', '</h3>' ); ?>
建立類似以下格式,使用如下語法:
標題:2008年3月25日
文章:2008年3月25日08點00分
文章:2008年3月25日11點37分
文章:2008年3月25日15點33分
標題:2008年3月22日
文章:2008年3月25日09點12分
文章:2008年3月25日10點16分
等等……
新增一個日期標頭:
<?php intermittent_date( 'jS F Y', "<h3 class='date-header'>", "</h3>" ); ?>
然後您可以使用 CSS 加以樣式化(但您的主題可能已經為您處理了這些)。
外掛標籤
開發者團隊
原文外掛簡介
Adds a template tag for use on pages which list posts, and to be used
within The Loop. Outputs
a date header to split up the post listings. See
the_date()
template tag docs for usage.
Any issues? Please contact me.
Known issues / bugs
Please report any issues that you find.
Examples
To produce something like this:
Heading: March, 2008
Post: dated 15th March
Post: dated 28th March
Post: dated 29th March
Heading: April, 2008
Post: dated 1st April
Post: dated 4th April
etc…
Add a date header like this:
', '
' ); ?>
To produce something like this:
Heading: 25th March, 2008
Post: dated 08:00 on 25th March
Post: dated 11:37 on 25th March
Post: dated 15:33 on 25th March
Heading: 22th March, 2008
Post: dated 09:12 on 25th March
Post: dated 10:16 on 25th March
etc…
Add a date header like this:
", "
" ); ?>
It’s up to you to style it with CSS then (although your theme may handle this for you).
