Permalinks with ID for bbPress

外掛說明

This plugin transforms default bbPress permalinks (URLs) that use slugs into permalinks that use numeric IDs.

Please star the GitHub repository to support continued development of this project.

螢幕擷圖

  • Forum URL. The plugin adopts to your permalinks settings (you can change it on default bbPress settings page).
  • Topic edit URL. With this plugin all pages and links correctly opens.

安裝方式

How to install the plugin?

  1. Download the plugin via the WordPress admin interface or execute wp plugin install bbpress-permalinks-with-id.
  2. Activate bbPress and this plugin via the WordPress admin interface or execute wp plugin activate bbpress-permalinks-with-id.
  3. Flush rewrite rules using one of the following methods:
    • Visit the /wp-admin/options-permalink.php page. WordPress automatically flushes rewrite rules every time you access this page, without requiring you to press the “Save Changes” button.
    • Alternatively, execute the wp rewrite flush command from WP-CLI.

How to uninstall the plugin?

  1. Deactivate the plugin via the WordPress admin interface or execute wp plugin deactivate bbpress-permalinks-with-id.
  2. Delete the plugin via the WordPress admin interface or execute wp plugin delete bbpress-permalinks-with-id.
  3. Flush rewrite rules using one of the following methods:
    • Visit the /wp-admin/options-permalink.php page. WordPress automatically flushes rewrite rules every time you access this page, without requiring you to press the “Save Changes” button.
    • Alternatively, execute the wp rewrite flush command from WP-CLI.

Important: URLs with IDs may have been shared on the internet, indexed by search engines, or referenced in your forum content. After uninstalling this plugin, those links will no longer function.

常見問題集

What URLs are supported?

You can find a detailed table of supported URL structures in the README.md on GitHub.

Does the plugin change URLs in the interface?

Yes. URLs within theme templates that are generated using the get_post_permalink() function will adopt the ID-based structure.

Do the old URLs in static content change?

No. Static content stored within the wp_posts table remains unaltered. The plugin only modifies the code responsible for generating and handling URLs.

Do the default URLs with slugs continue to work?

Yes. The original URLs with slugs remain accessible. However, the plugin does not provide automatic redirection from slug-based URLs to ID-based URLs.

How is the plugin tested?

The plugin undergoes manual testing with the latest WordPress and bbPress versions using the official Twenty Twelve (twentytwelve) theme. Additionally, automated code analysis tools test compatibility with both legacy and current versions, including Psalm and PHP Code Style validation (see .github/workflows/tests.yml).

Why use URLs with IDs instead of slugs?

  • Your forum operates in a language other than English and contains non-Latin characters.
  • Forum and topic titles include non-letter symbols (emojis, special characters such as <).
  • You frequently update slugs and titles of forums and topics and require more reliable and permanent URLs.
  • Shorter, cleaner URLs that are easier to share and remember.

使用者評論

2016 年 11 月 23 日
Still works perfectly in latest WordPress version
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Permalinks with ID for bbPress〉的開發相關工作。

參與者

將〈Permalinks with ID for bbPress〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.0.7

No code changes. The plugin was renamed and the “Requires at least” version was updated to comply with new WordPress.org policies.

1.0.6

No code changes, but a few unused functions were removed for cleaner code. This version was manually tested with WordPress 6.8.2, bbPress 2.6.14, and Twenty Twelve theme 4.6. Additionally, several PHP compatibility and code quality tools were added to the GitHub repository for automated validation (supporting PHP 5.6+). Thank you for continuing to use this plugin! The previous release was made almost 10 years ago. It is wonderful that the plugin continues to work reliably without requiring maintenance.

1.0.5

Update plugin text domain.

1.0.4

First version of plugin for wordpress.org. Without automatically flushing rewrite rules.