這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Custom Post Type Multiroutes

描述

Custom Post Type Multiroutes allows you to manage, add, edit and update multiple routes for your Custom Post Types.
Minimum configuration needed. Install it, type your routes for your posts and refresh permalinks.

Use case

Say you have a custom post type called ‘Galleries’ and you want it to appear on two archive pages:

/news/gallery/
/media/album/

And its single pages to be: /news/gallery/<gallery-name> and /media/album/<gallery-name>

All you have to do is:

  1. Go to Settings > CPT Multiroutes (you will se a list of your custom post types)
  2. Click on “Add Route” for your ‘Galleries’ post.
  3. Fill the new imput for that new route, in this case ‘news/gallery’
  4. Repeat 2&3 per route you want to add.
  5. Select the checkbox ‘Rewrite this post type archive to these routes’ if you want that route to be your archive page for the custom post type.
  6. Click Save Routes.

Additionally a custom Metabox will appear on each of those custom post types on its admin edit page, there you will be able to choose individually on which route you wish the post to be visible. By default it will be visible on all defined routes.

If you are using WPML for multilanguage, when you add a route, an input for each acive language will appear so you can translate those new routes.

螢幕截圖

  • Settings.
  • Admin custom post edit list.
  • Metabox on admin edit post page.

安裝

  1. Upload the entire Custom-Post-Type-Multiroutes folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

常見問題

Can i use this plugin for existing custom post types?

Yes. It will work with all CPT with these properties: ‘show_ui’ => true, ‘show_in_menu’ => true.

Can i translate the routes?

Yes. But currently it’s only compatible with WPML.

Is there a route limit?

No, you can add as much routes as you need.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Custom Post Type Multiroutes” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

Custom Post Type Multiroutes 外掛目前已有 1 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 Custom Post Type Multiroutes 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.1.1

  • Added admin edit post list column and filter by post cptmr_route postmeta.
  • Bugfix.

0.1.0

  • Initial release.