Php Wordpress自定义页面关系自定义url重写(放弃)
我已经创建了两个自定义帖子(帖子类型),我正在努力使URL正确 自定义页面1“产品”包含产品Php Wordpress自定义页面关系自定义url重写(放弃),php,wordpress,url-rewriting,parent-child,custom-pages,Php,Wordpress,Url Rewriting,Parent Child,Custom Pages,我已经创建了两个自定义帖子(帖子类型),我正在努力使URL正确 自定义页面1“产品”包含产品 自定义页面2“productlist”包含从产品中挑选的产品列表 创建产品列表时,您可以从自定义页面1中选择产品。 这种关系运作良好(使用ACF pro插件),产品在所有页面上都显示正确,只是URL错误 文件 归档productlist.php 单个productlist.php single-product.php 当前url结构: example.com/productlist/some list
自定义页面2“productlist”包含从产品中挑选的产品列表 创建产品列表时,您可以从自定义页面1中选择产品。
这种关系运作良好(使用ACF pro插件),产品在所有页面上都显示正确,只是URL错误 文件
归档productlist.php
单个productlist.php
single-product.php 当前url结构:
example.com/productlist/some list
example.com/product/some-product 应该是:
example.com/produclist/some-list/some-product index.php?post_type=productlist&productlist=单击的某些列表&product=单击的某些产品 在点击指向该产品的链接并返回到之前,url是良好的 example.com/product/some-product functions.php 产品页面应类似于:
'has_archive' => 'productlist',
‘rewrite’ => array(‘slug’=>’productlist/%thelist%/product’, ‘with_front’=> false),
productlist页面当前为:
‘rewrite’ => array(‘slug’=>’productlist’,’with_front’=> false),
经过几天的挠头和搜索,我已经放弃了,那么有人能解释一下如何修复这个问题吗