Post Type Switcher

外掛說明

這個外掛在內容編輯器頁面中增加的簡單易用的內容類型下拉式選單,讓具備編輯內容權限的使用者能將現有內容類型重新指派為新的內容類型,它同時也能讓具備編輯內容權限的使用者在編輯內容時直接轉換內容類型。

支援內的內容類型

這個外掛可以進行文章、頁面及自訂內容類型間的各種轉換組合:

  • 將頁面轉換為文章
  • 將文章轉換為頁面
  • 將文章轉換為某個自訂內容類型
  • 將某個自訂內容類型轉換為另一種自訂內容類型

這個外掛在 3.0.0 版之後,移除了對 [附件] 內容類型的支援。或許會在後續版本重新加入這項功能。

隱藏的內容類型如內容修訂、選單等均已刻意排除,如需存取這些隱藏的內容類型,可以使用 pts_post_type_filter 篩選器調整存取限制。

批次編輯

感謝 Matthew Gerring 對批次編輯提供的技術支援,使用者現在可以選取指定內容類型的全部文章,並將他們批次轉換為新的內容類型。

區塊編輯器

感謝 Daniel Bachhuber 對區塊編輯器/Gutenberg 外掛提供的技術支援,使用者現在無論使用區塊編輯器或傳統編輯器,均可自由轉換內容類型而不會損失任何嵌入的內容。

螢幕擷圖

  • [文章] 頁面中的 [內容類型] 欄位
  • [快速編輯] 中的 [內容類型] 介面
  • 編輯文章畫面中的 [內容類型] 介面

安裝方式

安裝方式

  1. 在 WordPress 控制台中,前往 [外掛]→[安裝外掛]。
  2. 搜尋「Post Type Switcher」。
  3. 點擊 [安裝] 按鈕便能安裝這個外掛。
  4. 點擊 [啟用] 按鈕便能啟用這個外掛。
  5. 在編輯內容的畫面中,[發佈] 按鈕的上方會出現 [內容類型] 介面。
  6. 將內容類型變更為符合需求的內容類型。

最低安裝需求

  • WordPress version 5.0 or greater.
  • PHP version 7.0.0 or greater.
  • MySQL version 5.7 or greater.

建議安裝需求

  • WordPress 最新版本。
  • PHP version 8.0 or greater.
  • MySQL version 8.0 or greater, or MariaDB 10.5 or greater.

常見問題集

這個外掛的使用情境為何?

具備編輯內容權限的使用者需要將從其中一種內容類型變更為另一種時。

這個外掛會破壞原始內容關聯的分類法嗎?

應該不會。這個外掛僅會變更內容的 post_type 屬性。

Does this ruin block-editor content?

It should not. Be careful when editing HTML content while switching between editor types!

Will this delete my content?

No. This plugin does not include any code capable of deleting anything.

Plugin conflicts are not unheard of and can be difficult to troubleshoot.

If you’re worried, backup your database and deactivate all other plugins before using this tool.

If you’re still worried, ask for help in the WordPress.org support forums.

使用者評論

2021 年 4 月 1 日
There’s really no other option when you need to filter out posts by type. It would be a nightmare to do it manually, so this plug in is one of a kind! Really helpful and works perfectly. Thanks a lot!
2021 年 3 月 25 日
This was just what I needed to convert a ton of pages to projects and posts. My one concern was that it wasn't a physical move but it appears to me it's moving over all my content properly. As a test I tried disabling the plugin and everything stayed where it was moved. THANK YOU!
2021 年 3 月 20 日
I frequently switch a front-page piece to a post and vice versa. This plugin does the job perfectly.
2021 年 3 月 14 日
One thing that really annoys me is one-stars people have given. Would you like a YouTube video showing the install of the plugin and usage? Also what do you think about an "Ask for help" link in the plugin list? If you have these, maybe we could collaborate on adding it to the public plugin page, so that there is no excuse to < 4-5 star this plugin? Again. Great plugin.
2021 年 3 月 14 日
If you have imported or added loads of posts in the wrong post type, you needn't curse. Just install and convert the posts to the needed one. That's what this plugin does for me. Has saved my bacon so many times. Highly recommended.
2021 年 3 月 9 日
This plugin worked seamlessly with around 150 pages that I needed converted to posts. For some reason this plugin is not supported on WP.com? Not sure why.
閱讀全部 190 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Post Type Switcher〉的開發相關工作。

參與者

Post Type Switcher 外掛目前已有 25 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

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

對開發相關資訊感興趣?

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

變更記錄

3.2.0

  • Block editor support

3.1.0

  • Fix post targeting when called recursively

3.0.0

  • Improved Quick-Edit and Bulk-Edit support
  • Remove attachment type support for now, as there is no way to switch back
  • Fix bug causing some post-types to switch unexpectedly

2.0.1

  • Ensure quick-edit works with new procedure
  • Quick-edit “Type” column works again!

2.0.0

  • Improved plugin compatibility with WooThemes Sensei
  • Filter post arguments vs. hook to save_post
  • Add “post_type_switcher” action

1.7.0

  • Add support for network activation

1.6.0

  • Add textdomains for localization
  • Load translation strings using load_plugin_textdomain()
  • Before saving data chack if it’s not an autosave using wp_is_post_autosave()
  • Before saving data chack if it’s not a revision using wp_is_post_revision()
  • Security: Prevent direct access to directories
  • Security: Translation strings escaping
  • Add screenshots

1.5.0 – norcross

  • Fix multiple quickedit dropdowns

1.4.0

  • Improve handling of non-public post types

1.3.0

  • Fix saving of autodrafts

1.2.1

  • Improved WordPress 3.9 integration (added dashicon to publish metabox)

1.2.0

  • Add bulk editing to supported post types
  • Props Matthew Gerring for bulk edit contribution

1.1.1

  • Add is_admin() check to prevent theme-side interference
  • Change save_post priority to 999 to avoid plugin compatibility issues
  • Remove ending closing php tag
  • HTML and PHPDoc improvements

1.1.0

  • Fix revisions being nooped
  • Fix malformed HTML for some user roles
  • Make a singleton (meh…)

1.0.0

  • Fix JS bugs
  • Audit post save bail conditions
  • Tweak UI for WordPress 3.3

0.3.0

  • Use the API to change the post type, fixing a conflict with persistent object caches
  • No longer requires JavaScript

0.2.0

  • Disallow post types that are not public and do not have a visible UI

0.1.0

  • Release