| 开发者 | yeshuahin |
|---|---|
| 更新时间 | 2026年11月26日 22:44 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
https://example.com/bangkok/20/
The URL stays valid when the post title or slug changes, because the ID never changes.
Features
[alt_post_url] prints the alternative URL of the current post, or of a given post with [alt_post_url id="123"]./?category_name=bangkok&p=20.yhh_altpost_get_url( $post ) returns the alternative URL of a post.yhh_altpost_main_category filter changes the category used in the URL.yhh_altpost_redirect_to_permalink filter, return true to redirect the alternative URL to the normal permalink.yeshuahin-alternative-post-urls folder to /wp-content/plugins/, or install the zip through Plugins > Add New./category/id/ form, set Settings > Permalinks to any option other than Plain.One category is shown: the primary category from Yoast SEO, Rank Math or SEOPress if set, otherwise the first category alphabetically (the default category is only used if it is the only one). The URL also works with any other existing category slug.
No. The normal permalink is still the canonical URL of the post.
No, only standard posts.