简体   繁体   English

为自定义模板重写自定义网址结构并在WordPress中发布

[英]Rewrite custom url structure for custom template & post in WordPress

I'm creating a web app using WordPress I have implemented a plugin for custom posting which product related all are ok but the problem is view URL. 我正在使用WordPress创建一个Web应用程序,我已经实现了用于自定义发布的插件,该产品相关的所有产品都可以,但是问题是查看URL。

I have created a template for product details view, source URL like this below 我为产品详细信息视图创建了一个模板,如下所示为源URL

$category = Vehicle Accessories;

www.example.com/product-view/?category= $category

And get category name & view details based on the category name. 并获取类别名称并根据类别名称查看详细信息。

Generate below link: 生成以下链接:

www.example.com/product-view/?category=Vehicle%20Accessories

I need to below example 我需要下面的例子

www.example.com/product-view/Vehicle%20Accessories

How can I implement this? 我该如何实施?

Thanks 谢谢

You can change the URL structure in Settings -> Permalinks. 您可以在设置->永久链接中更改URL结构。

https://codex.wordpress.org/Settings_Permalinks_Screen https://codex.wordpress.org/Settings_Permalinks_Screen

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM