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

WP Permastructure

外掛說明

In addition to controlling your custom post type permalinks this plugin adds support for using custom taxonomies in your permalink structures as well.

Not only that but you can control the full permalink so the post type slug is not required at the start of the link.

Multiple post types can use the same permalink structure.

Usage

There are 2 ways to use this plugin:

Permalink Settings

The plugin adds fields to the permalinks settings page for any public facing custom post types.

In Code

When registering a post type you can add a value to the rewrite property with the key ‘permastruct’ to define your default permalink structure.

eg:

<?php

register_post_type( 'my_type', array(
    ...
    'rewrite' => array(
        'permastruct' => '/%custom_taxonomy_name%/%author%/%postname%/'
    ),
    ...
) );

?>

螢幕擷圖

  • The extended permalink settings panel

安裝方式

  1. You can install the plugin using the auto-install tool from the WordPress back-end.
  2. To manually install, upload the folder /wp-permastructure/ to /wp-content/plugins/ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. You should now see input boxes for any custom post types you have on the permalink settings page

常見問題集

None so far.

使用者評論

2016 年 9 月 3 日 1 則留言
The plugin did not what I expected. I decided to deactivate the plugin. After that, every page gave a 404 error. When I asked for support, a few months ago, I didn’t receive any reaction. So my advice, think twice before installing this plugin
2016 年 9 月 3 日
Exactly what I needed thanks !
2016 年 9 月 3 日
OMG, your plugin is awesome 😀 thank you so much for this excellent plugin
2016 年 9 月 3 日
this is the only way/plugin/code which works for me. thank you very much!!
閱讀全部 15 則使用者評論

參與者及開發者

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

參與者

將〈WP Permastructure〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

  • 1.4.3: Remove create_function calls
  • 1.4: Handles sample filters without the need for the get post call
  • 1.3: Added permalink sanitisation function, current one incorrectly truncated placeholders
  • 1.2: Fixed attachment URL rewrites, fixed edge case where permastruct is %postname% only
  • 1.1: Fixed problem with WP walk_dirs and using %category% in permalink – overly greedy match
  • 1.0: Initial import