[WordPress] 外掛分享: AW WordPress Yearly Category Archives

前言介紹

  • 這款 WordPress 外掛「AW WordPress Yearly Category Archives」是 2013-08-17 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2018-01-30,距離現在已有 2662 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.5.2 以上版本才可以安裝。
  • 有 4 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

awarren |

外掛標籤

archives | Yearly Archives | Yearly Category Archives | Category Archives by Year |

內容簡介

AW WordPress Yearly Category Archives(AW WordPress 按年份分類存檔)提供了兩個(2)短碼,這兩個短碼都是插件正常運作所必需的。

按照以下說明使用插件。

第一個短碼是 [aw_year_links cat="X" postslug="slug-to-post-or-page"],用於建立並顯示年度鏈接(年份归档)。

以下列出了此短碼的用法和要求。

此短碼有兩個(3)屬性,其中兩個(2)是必需的,一個(1)是可選的。
cat="X" 屬性是您希望顯示年度鏈接的類別 ID。將 X 替換為您要查詢的類別的數字 ID。如果您想查詢多個類別,則可以在此屬性中包含用逗號分隔的類別 ID 列表。這個屬性是必需的。
postslug="slug-to-post-or-page" 屬性是顯示年度存檔文章的頁面的 slug。這也是您要在其中包含第二個短碼的頁面的 slug。此屬性是必需的。
dropdown="yes" 屬性允許使用下拉選擇輸入以代替標準的年度鏈接無序列表。此屬性是可選的,如果不需要可以完全不使用。
在您想顯示指定類別的年度鏈接的位置放置此短碼。

第二個短碼是 [aw_show_posts cat="X" readmore="Continue Reading" publishedon="n/j/Y"],用于在單擊年份鏈接後顯示文章內容。

以下列出了此短碼的用法和要求。

此短碼有三個(3)屬性,其中一個(1)是必需的,兩個(2)是可選的。
cat="X" 屬性是您希望顯示年度存檔文章的類別 ID。將 X 替換為您要查詢的類別的數字 ID。如果您想查詢多個類別,則可以在此屬性中包含用逗號分隔的類別 ID 列表。這個屬性是必需的。
readmore="Continue Reading" 屬性是您希望顯示“繼續閱讀”鏈接的文本。如果不使用此屬性,它將預設為“繼續閱讀”。
publishedon="n/j/Y" 屬性是發布日期將出現在存檔文章中的 PHP 日期格式。如果不使用此屬性,它將預設為“M jS, Y”。有關 PHP 日期格式的更多信息,請參見這裡。
showsubheader="no" 屬性用於在文章輸出上方顯示一個子標題,該子標題說明顯示的是哪個類別和年份。它將顯示為:“Category: Example Category Name - Year: 20XX”。這是一個可選的短碼屬性。如果在短碼中不使用此屬性,則將顯示子標題。 使用 showsubheader="no" 不輸出子標題。這個屬性是可選的,如果不需要可以完全不使用。
在您想顯示存檔文章的位置放置此短碼。

附加注意事項

只要它們始終以相同的 cat="X" 屬性成對使用,就可以在整個網站上多次使用短碼。這對於顯示獨立的按年份分類存檔非常有用。
插件將查詢所有自定義文章類型以及主“文章”。
目前,插件將為每個文章顯示五(5)個元素,除非管理員選擇在設置頁面上自己編寫文章結構。它們按順序是:

原文外掛簡介

AW WordPress Yearly Category Archives has two (2) shortcodes available, both of which are required for the plugin to function properly.
Follow the instructions below to use the plugin.
The first shortcode is [aw_year_links cat="X" postslug="slug-to-post-or-page"], which is used to build and display the year links.
The following list explains this shortcode’s usage and requirements.

This shortcode has two (3) attributes. Two (2) are required, and one (1) is optional.
The cat="X" attribute is the category ID you wish to display yearly links from. Replace the X with the numerical ID of the category you wish to query. You may include a comma separated list of category IDs with this attribute if you want to query multiple categories. This attribute is required.
The postslug="slug-to-post-or-page" attribute is the slug to the page that will display your yearly archived posts. This is also the slug of the page you will include the second shortcode on. This attribute is required.
The dropdown="yes" attribute will allow a dropdown select input to be used in place of the standard unordered list of the year links. This attribute is optional and can be left off completely.
Place this shortcode where you would like to display the year links to the specified category.

The second shortcode is [aw_show_posts cat="X" readmore="Continue Reading" publishedon="n/j/Y"], which is used to display the post content after click a year link.
The following list explains this shortcode’s usage and requirements.

This shortcode has three (3) attributes. One (1) is required, and two (2) are optional.
The cat="X" attribute is the category ID you wish to display yearly archived posts from. Replace the X with the numerical ID of the category you wish to query. You may include a comma separated list of category IDs with this attribute if you want to query multiple categories. This attribute is required.
The readmore="Continue Reading" attribute is the text you wish to display for the “Read More” link. This attribute is optional and will default to “Read More” if left out.
The publishedon="n/j/Y" attribute is the PHP date format the published on date will appear in the archived posts. This attribute is optional and will default to “M jS, Y” if left out. Refer here for further info on the PHP date format.
The showsubheader="no" attribute is used to display a subheader above the post output that says which category and year is being displayed. it will read like this: Category: Example Category Name – Year: 20XX. This is an optional shortcode attribute. If left off the shortcode the subheader will be shown. Use showsubheader="no" to not output the subheader. This attribute is optional and can be left off completely.
Place this shortcode where you would like to display your archived posts.

Additional Notes

The shortcodes can be used multiple times throughout the site as long as they are always used in pairs with each pair having the same cat="X" attribute. This is handy for displaying separate yearly category archives.
The plugin will query all custom post types as well as the main “Posts”.
Currently the plugin will display Five (5) elements for each post, unless the admin chooses to write their own post structure on the settings page. They are as follows and in order:

Category: Example Category Name - Year: 20XX

– (this wraps each post including all the elements below in this list)

The Post's Title

Published on Aug 13th, 2013

The Post's First 25 Words...Read More


The actual post elements have classes; however they do not have styles. This is to allow you to style them how you choose. The only frontend style included is for the post divider
rule. This can be overriden if you so choose to.
Currently there is also no pagination built into the display of yearly archived posts. I do have plans for this in the future if time allows.
Currently I will only be able to offer limited support for this plugin. This could change in the future, also if time allows.
If you do not know how to find your category IDs, I recommend Reveal IDs.

Follow me on Twitter @iAmAndyWarren or find me at andy-warren.net. Want to make the plugin better? Fork it or submit pull requests on GitHub at https://github.com/andywarren/aw-yearly-category-archives.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「AW WordPress Yearly Category Archives」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.0.1 | 1.1.1 | 1.2.2 | 1.2.7 |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon