具有id和slug(但具有id路由)的永久链接

问题描述 投票:0回答:1

我的舞台:使用PHP 7.2WordPress 5.2.4

我希望我的永久链接可以通过post / id和标题条来访问:

example-page.com/post_id/

example-page.com/post_id/post_title

我想要实现的是:URL应该是显示标题段,但只能通过ID以/ 10 / this-is-the-title-slug的形式查询页面

我必须在functions.php或WordPress永久链接设置中输入什么?

php mysql wordpress custom-wordpress-pages
1个回答
2
投票

您的情况应该是:

/%post_id%/%postname%/

© www.soinside.com 2019 - 2024. All rights reserved.