[WordPress] 外掛分享: Index Pages

前言介紹

  • 這款 WordPress 外掛「Index Pages」是 2016-02-02 上架。
  • 目前有 60 個安裝啟用數。
  • 上一次更新是 2024-10-14,距離現在已有 202 天。
  • 外掛最低要求 WordPress 4.0.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.4.0 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

dougwollison |

外掛標籤

index page | custom index | page for posts | custom post type |

內容簡介

Index Pages 系統允許您指定某些頁面作為特定文章類型的索引頁面。

這樣,如果您當前使用的佈景主題支援,您可以自定義標題、文本內容和其他信息,
在文章類型的存檔頁面上顯示它們。

對於佈景主題開發人員,該插件提供了一些模板函數,可加載當前索引頁面(包括文章頁面)的
文章對象,類似於 the_post();,從而創建諸如可自定義的介紹橫幅之類的東西,它出現在列表上面,
使用索引頁面的數據。

指定索引頁面在頁面管理員中標記為此,以便易於識別。

使用文檔

索引頁面分配界面可以在“設置”>“閱讀”下找到。默認情況下,所有註冊了 has_archive 參數設置為 true
的文章類型都可以進行分配。

對於主題和插件開發人員,您可以註冊支持您的自定義文章類型,如下所示:

IndexPages\Registry::add_post_types( $post_types ); // 一個或多個文章類型的數組

當分配索引頁面時,它的永久鏈接將指向相關文章類型的存檔,並相應地更新頁面標題。

對於主題和插件開發人員,您可以使用以下方法訪問索引頁面的文章對象。

the_index_page();

這與 the_post(); 完全相同,使用索引頁面的數據填充 $post 變量。

原文外掛簡介

The Index Pages system allows you to designate pages as the index page for a particular post type.
This allows you to have a custom title, text content, and other information displayed on your
post type archives, should your current theme support it.
For theme developers, the plugin offers some template functions for loading the post object for the
current index page (including the posts page), in a similar fashion to the_post();, to create things
like a customizable introductory banner that appears above the listing, using the index page’s data.
Designated index pages are flagged as such in the Pages manager, for easy recognition.
Usage Documentation
The Index Page assignment interface can be found under Settings > Reading. By default, all post types
registered with the has_archive argument set to true will be available for assignment.
For theme and plugin developers, you can register support for your custom post types like so:
IndexPages\Registry::add_post_types( $post_types ); // a single post type or array of post types

When an index page is assigned, it’s permalink will point to the associated post type’s archive, with
the page title updated appropriately.
For theme and plugin developers, you can access the index page’s post object with the following.
the_index_page();

This works exactly like the_post();, populating the $post variable with the index page’s data.

各版本下載點

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

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


1.0.0 | 1.1.0 | 1.2.0 | 1.3.0 | trunk | 1.3.0.1 |

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

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon