[WordPress] 外掛分享: AlphaListing

WordPress 外掛 AlphaListing 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「AlphaListing」是 2025-03-11 上架。
  • 目前有 30 個安裝啟用數。
  • 上一次更新是 2025-04-15,距離現在已有 19 天。
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 8.0 以上。
  • 尚未有人給過這款外掛評分。
  • 論壇上目前有 2 個提問,問題解答率 50%

外掛協作開發者

eslin87 |

外掛標籤

a-z | index | a to z | widget | listing |

內容簡介

總結:使用AlphaListing外掛,您可以以字母順序展示您的文章、頁面和術語,在Rolodex、目錄或目錄式列表中。此外,該外掛還支持在任何地方連結到列表的短代碼和小工具。您可以按照指定方式顯示不同類型的文章、頁面或術語,並通過設置選項來自定義列表的外觀和行為。

1. 如何使用AlphaListing外掛展示文章或術語?
- 使用短代碼[alphalisting]來創建列表。
- 若要指定文章型態顯示而非頁面,可以使用例如:[alphalisting display="posts" post-type="post"]。
- 透過[alphalisting display="posts" post-type="post" taxonomy="category" terms="my-term-slug"]來使用分類法篩選文章。

2. 怎樣展示別的術語或分類而不是文章或頁面?
- 使用[alphalisting display="terms" taxonomy="category"]以顯示來自分類的術語。
- 透過[alphalisting display="terms" taxonomy="category" parent-term="42" get-all-children="yes"]顯示特定樹下的所有深度內的術語。

3. 怎樣顯示數字?
- 透過[alphalisting display="posts" numbers="after"]添加數字到列表後面。
- 可以選擇在字母前或後顯示數字,例如:[alphalisting display="posts" numbers="before"]。

4. 其他常見選項是哪些?
- display: 指定展示文章或術語。
- numbers: 在字母前或後附加或預置數字。
- grouping: 指定如何將字母分組。
- group-numbers: 指定如何分組數字。

原文外掛簡介

Display posts, pages, and terms alphabetically in a Rolodex-, catalog-, or directory-style list with the AlphaListing plugin!
This plugin includes a block and shortcode for the list, along with a widget for linking to the list from any location on a site. If a letter has no associated pages, the widget will display the letter unlinked, while the list page will omit the letter entirely.
Show posts from any single or multiple post types, including built-in posts and pages. Post types from plugins like WooCommerce products are also supported. Alternatively, display terms such as categories or tags.
** This plugin is based on the original A-Z Listing by Lucy (formerly Dani) Llewellyn, which is no longer maintained. Using a custom template is not guaranteed to continue working. For the latest example of the template, see the example template.**
Gutenberg Block
Use the AplhaListing block in most cases, as it provides guidance for configuring various options.
Shortcode for compatibility and PHP use
The plugin provides a shortcode for the full AlphaListing, enabling use without modifying theme templates.
Basic usage is as follows:
[alphalisting]

To specify a post-type to display instead of page then use, e.g. post:
[alphalisting display="posts" post-type="post"]

To filter the posts by a term from a taxonomy:
[alphalisting display="posts" post-type="post" taxonomy="category" terms="my-term-slug"]

To display pages that are direct children of the page with ID 24:
[alphalisting display="posts" post-type="page" parent-post="24"]

To display pages that are children of any depth below the page with ID 24:
[alphalisting display="posts" post-type="page" parent-post="24" get-all-children="yes"]

To show terms from a taxonomy instead of posts and pages, e.g. Terms from the Categories taxonomy:
[alphalisting display="terms" taxonomy="category"]

To show terms from the Categories taxonomy that are direct children of the term with ID of 42:
[alphalisting display="terms" taxonomy="category" parent-term="42"]

To show terms from the Categories taxonomy that are children of any depth in the tree below the term with ID of 42:
[alphalisting display="terms" taxonomy="category" parent-term="42" get-all-children="yes"]

To override the alphabet used by the plugin:
[alphalisting display="posts" alphabet="Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz"]

To add numbers to the listing:
[alphalisting display="posts" numbers="after"]

The numbers can also be shown before the alphabet:
[alphalisting display="posts" numbers="before"]

Group the numbers into a single collection for all posts beginning with a numeral.:
[alphalisting numbers="after" group-numbers="yes"]

To group the alphabet letters into a range:
[alphalisting grouping="3"]

** The arguments are all optional **
Common options

display: specifies whether to display posts or terms from a taxonomy.

Default value: posts.
May only contain one value.
Must be set to either posts or terms.
Any value other than posts or terms will default to displaying posts.

numbers: appends or prepends numerals to the alphabet.

Default value: unset.
May only contain one value.
Must be set to either before or after.
Any value other than before or after will default to appending numerals to the alphabet.

grouping: tells the plugin if and how to group the alphabet.

Default value: unset.
May only contain one value.
Must be set to any positive number greater than 1 or the value numbers.
Any value other than a positive number or the value numbers will default to disabling all grouping functionality.
When set to a number higher than 1 the listing will group letters together into ranges.
For example, choosing 3 groups the Latin alphabet so that A, B, and C become A-C, followed by D-F, G-I, and so on.
When using this setting, if numbers are also shown via the numbers="before" or numbers="after" attribute then they will be shown as a single separate group 0-9.
When set to the value numbers it will group numerals into a single group 0-9.
This requires the numbers to be displayed via the numbers="before" or numbers="after" attributes.

group-numbers: tells the plugin to group all items beginning with a numeral into a single collection.

Default value: false.
May only contain one value.
Must be set to true, yes, on, or 1 to group items beginning with a numeral in a single collection. All other values will keep the default behaviour.

symbols-first: Tells the plugin to put the unknown alphabet letter (symbols) group before the main alphabet.

Default value: false.
May only contain one value.
Must be set to true, yes, on, or 1 to put the symbols group before the alphabet. All other values will keep the default behaviour.

alphabet: overrides the alphabet used by the plugin..

Default value: unset.
If this attribute is not defined, the plugin uses either the untranslated default or a translation from glotpress if available for the site’s language, as set in Admin -> Settings -> Site Language.
The current untranslated default is: AÁÀÄÂaáàäâ,Bb,Cc,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,Zz.
Accepts a single line of letters/symbols, which need to be separated via the comma character ,.
Including more than one letter/symbol in each group will display posts starting with any of those under the same section.
The first letter or symbol in each group serves as the group’s heading when displayed on the site.

Posts options

post-type: sets the listing to show a specific post-type.

Default value: page.
Multiple post-types may be specified by separating with commas (,) e.g. post-type="page,post".
Must be the slug of the post-type(s).

parent-post: sets the parent post that all displayed posts must be descended from.

Default value: unset.
May only contain one value.
Must be the ID of the parent post.
Add get-all-children="yes" to also include all descendants of any depth below the parent post.

exclude-posts: remove these posts from the list.

Default value: unset.
Multiple posts may be specified by separating by commas: ,.
Must be the ID of the post(s).

taxonomy: sets the taxonomy containing the terms specified in the terms="" option.

Default value: unset.
May only contain one value.
Must be the slug of the taxonomy.

terms: sets the taxonomy terms for filtering posts.

Default value: unset.
The taxonomy must also be specified in taxonomy.
Multiple terms may be specified by separating with commas: ,.
Must be the slug of the term(s).

Terms options

taxonomy: sets the taxonomy to display terms from in the listing.

Default value: unset.
Multiple taxonomies may be specified by separating with commas: ,.
Must be the slug of the taxonomy.

terms: sets the taxonomy terms to include in the listing.

Default value: unset.
The taxonomy must also be specified in taxonomy.
Multiple terms may be specified by separating with commas: ,.
Must be the ID of the term(s).
Cannot be used with exclude-terms="".

exclude-terms: sets the terms to exclude from display.

Default value: unset.
The taxonomy must also be specified in taxonomy.
Multiple terms may be specified by separating with commas: ,.
Must be the ID of the term(s).
Cannot be used with terms="".

parent-term: set the parent that all displayed terms must be descended from.

Default value: unset.
May only contain one value.
Must be the slug of the parent term.
Add get-all-children="yes" to also include all descendants of any depth below the parent term.

get-all-children: when a parent term is chosen this option is used to show all children of any depth or only direct children.

Default value: false.
May only contain one value.
Must be set to true, yes, on, or 1 to include all children of any depth. Any value other will use the default behaviour of only showing direct children.

hide-empty-terms: hide terms that have no posts associated.

Default value: false.
May only contain one value.
Must be set to true, yes, on, or 1 to hide the empty terms. Any other value will use the default behaviour of showing all terms.

Internal-use options for completeness
** These are intended for internal use by the plugin and should not require any modifications.**

target: the default target for a listing that doesn’t show any items.

Default value: unset.
May only contain one value.
Must be set to a URL which will be used as the target for the letters’ hyperlinks.

return: what type of listing to show, either listing or letters.

Default value: listing.
May only contain one value.
Must be set to either listing to display the default view, or letters to show only the letters without any items (posts or terms).

PHP (expert)
Most compatible method
The best way to use the plugin from PHP is to call do_shortcode( '[alphalisting]' ); and save or echo the returned text. The parameter passed to do_shortcode() should be a complete AlphaListing shortcode with parameters as above.
Multiple Column Output
Multiple column layout is the default on wide screens. A letter’s group of items must contain at least 15 items to create two or more columns. This is to provide a more aesthetically pleasing view when a list is short with only a few items.
Templates and Theming
The plugin allows the site owner, developer, or themer to provide custom templates for the AlphaListing output.
To add a template to a theme, create a file similar to templates/a-z-listing.php from the plugin folder. Place the copy in the theme’s root directory and name it a-z-listing.php or a-z-listing-section.php (with -section as an optional top-level page slug for the section-targeting feature).
The Loop
The theme system this plugin implements is very similar to the standard WordPress loop, with a few added bits.
Important functions to include in the template are:

$a_z_query->the_letters() prints the full alphabet, and links the letters that have posts to their section within the index page.
$a_z_query->have_letters() returns true or false depending on whether there are any letters left to loop-through. This is part of the Letter Loop.
$a_z_query->have_items() behaves very similarly to Core’s have_posts() function. It is part of the Item Loop.
$a_z_query->the_letter() similar to Core’s the_post(), this will set-up the next iteration of the AlphaListing’s Letter Loop. This needs to wrap-around the Item Loop.
$a_z_query->the_item() similar to Core’s the_post(), this will set-up the next iteration of the AlphaListing’s Item Loop, the same way the normal WordPress Loop works. This needs to be within the Letter Loop.

Within the Item Loop, all built-in WordPress Core post-related functions, such as the_content(), can be used. Titles and permalinks have helper functions to accommodate AlphaListing’s display of taxonomy terms (see the next section).
Starting with a copy of the default template is recommended when creating a custom version. The provided template demonstrate the usage of most functions available in the plugin.
Helper functions
The plugin supports displaying taxonomy terms as though each term were a post. This means that the WordPress functions related to posts such as the_title() and the_permalink() are unreliable. We have therefore added helper functions which will return or print the correct output for the item.
These helper functions cope with the dual usage of the plugin supporting both WP_Query-based (returning WP_Post objects) and Taxonomy Terms (returning WP_Term objects) listings. These are:

$a_z_query->the_title() – prints the current item’s Title
$a_z_query->get_the_title() returns the current item’s Title but does not print it directly
$a_z_query->the_permalink() prints the current item’s Permalink
$a_z_query->get_the_permalink() returns the current item’s Permalink but does not print it directly
$a_z_query->the_item_id() prints the current item’s ID
$a_z_query->get_the_item_id() returns the current item’s ID but does not print it directly

各版本下載點

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

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


4.3.4 | 4.3.5 | trunk |

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

  • Directorist: AI-Powered Business Directory Plugin with Classified Ads Listings 》試用管理員演示 | 示範 | 文檔 | 佈景主題 | 擴充套件 | 路線圖, 想在您的 WordPress 網站上建立類似 Yelp、Yellow-Pages 或 Tripadvisor 的企業列表線上目錄...。
  • HivePress – Business Directory & Classified Ads Plugin 》HivePress 是一款易於使用、可擴充和高度可自定義的外掛程式,可讓您建立任何類型的目錄網站。, , Demo | Themes | Extensions | Docs | Support, , 無論是業...。
  • Participants Database 》此外掛完整提供建立和維護人員或任何你想要的資料庫所需的所有功能。資料庫是可以完全配置的,允許您為每個記錄定義要存儲的所有信息字段。記錄可以逐個在 Wo...。
  • WP Directory Kit 》此外採用本外掛,您可以輕鬆管理後台的列表、分類和字段,並且安裝也非常簡單。, 作為此專案解決方案的一部分,我們還為房地產代理機構建立了 WordPress 主題...。
  • Custom Post Limits 》此外掛可獨立控制首頁、搜尋結果、作者、分類、標籤、自訂文章型別、自訂分類法和日期存檔的文章數量,包括特定的存檔。 WordPress 預設提供一個設定選項來控...。
  • Auction Nudge – Your eBay on Your Site 》使用Auction Nudge,一個經過 eBay 批准的外掛程式,可以在您的 WordPress 網站上顯示您的 eBay 即時資訊。, 在支援「Shortcodes」的任何位置添加「Auction N...。
  • Simple Event Planner 》這個外掛有英文、俄文(Русский)、德文(Deutsch)、波蘭文(Polski)和塞爾維亞文(Српски језик)版本。, 你正在尋找易於使用、用戶友好且堅固的事件管理外掛嗎?,...。
  • NS Category Widget 》你是否對 WordPress 預設的分類小工具缺少自訂選項感到沮喪?那麼這個外掛就是為你而生。它的操作方式類似,但卻擁有多種自訂選項。加油!。
  • aDirectory – WordPress Directory Listing Plugin 》**總結:**, , Adirectory 是一個完整的目錄清單 WordPress 外掛,專為建立專業目錄及分類網站而設計。特別適用於商業目錄和分類清單專案。它提供了擴展功能...。
  • Best Listing Toolkit 》這是由 https://www.wpwax.com 所開發的必備工具包,為最佳清單主題所設計。此外掛將新增自訂的 Elementor Widget 和主題 Widget 等新功能。。
  • WP LIST PAGES BY CUSTOM TAXONOMY 》這個外掛會在 Widgets 區域提供一個新的 Widget,讓你可以輕鬆地把它添加到你佈景主題的任何部件區域中。, 使用此 Widget,你可以按類別名稱、標籤、和任何自...。
  • Square Sync 》Square Sync是一款WordPress外掛,透過短碼(shortcode),您可以在您的WordPress網頁/文章上列出您在Squareup上的產品。這些產品是透過連接Squareup API列出...。
  • WP Storefront – Magento 2 Product Showcase 》利用 WP Storefront 外掛增強您的產品。在文章或網頁上告知顧客您的新品項,增加您網路店面的訪客數量!, 外掛功能, , 支援的電子商務平台:Magento 2 (2.3-2...。
  • Category Listing for WooCommerce 》預設情況下,WooCommerce 會在同一個列表中顯示類別和產品。這樣看起來並不好,而且對使用者來說很難理解哪些是產品,哪些是類別。, 這個小外掛程式會將類別...。
  • Control Listings – Classifieds Ads Directory Portal Manager 》Control Listings 是一個多功能的目錄外掛程式,讓目錄管理變得更有效率。使用這個強大的目錄管理員,輕鬆地創建分類廣告門戶網站或商業目錄。使用其用戶友好...。

文章
Filter
Apply Filters
Mastodon