Make WordPress 'Pages' display tagged posts

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 會自動修改成tagbike”。

 

  早期我的解決方式是改輸入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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.