WordPress 'Pages' (page)function is mainly used for creating static pages,But I've always wanted to use it as a menu for category pages,如下圖:

我使用的方式是將「新增頁面」的 “永久連結” 輸入 tag 的位址,但這邊會遇到一個問題,假設我想將 tag 為 bike 的文章做成一個頁面,我會需要在連結輸入 “tag/bike”,但如果這樣輸入按確定後,WordPress 會自動修改成 “tag–bike”。

早期我的解決方式是改輸入 “tag%2fbike”,This input method will not cause WordPress to automatically correct the content,and when the browser parses it “%2f” 時,it will automatically convert to “/“,therefore achieving what I want “tag/bike” Link。
Today, after handling WordPress migration matters,when checking some links,I found that this trick doesn't seem to work under https,After trying a few more methods,I finally decided to directly modify the database,once and for all,The modification method is as follows:
1. Using phpMyAdmin,輸入下面指令,列出所有「頁面」項目。
SELECT * FROM `wp_posts` WHERE `post_type` = 'page'
2. 編輯資料的 “post_name” 欄位,直接改成想要的位址。









Leave a Reply