Php 在WooCommerce产品类别中包括静态页面
我的网站有几个产品类别,例如:Php 在WooCommerce产品类别中包括静态页面,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,我的网站有几个产品类别,例如: site.com/product-category/logs site.com/product-category/sheds site.com/product-category/wood site.com/product-category/local 对于最后一个,我还有一个本地产品页面:site.com/local 我想用site.com/local链接替换我商店页面上的site.com/product-category/local链接。我已尝试在my fu
- site.com/product-category/logs
- site.com/product-category/sheds
- site.com/product-category/wood
- site.com/product-category/local
<?php
function replace_content($content) {
$content = str_replace('/product-category/local/', '/local/',$content);
return $content;
}
add_filter('the_content','replace_content');