Sửa lỗi Rank Math Polylang Remove category base WooCommerce 404

04 Apr 2022
0 Comments

Truy cập : wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-permalink-watcher.php

Thêm với ngôn ngữ tiếng anh. Làm tương tự với các ngôn ngữ khác

                
                    
$category_rules[ "en/{$cat_slug}/?\$" ]                                  = 'index.php?product_cat=' . $category['slug'];
$category_rules[ "en/{$cat_slug}/embed/?\$" ]                            = 'index.php?product_cat=' . $category['slug'] . '&embed=true';
$category_rules[ "en/{$cat_slug}/{$wp_rewrite->feed_base}/{$feed}/?\$" ] = 'index.php?product_cat=' . $category['slug'] . '&feed=$matches[1]';
$category_rules[ "en/{$cat_slug}/{$feed}/?\$" ]                          = 'index.php?product_cat=' . $category['slug'] . '&feed=$matches[1]';
$category_rules[ "en/{$cat_slug}/{$wp_rewrite->pagination_base}/?([0-9]{1,})/?\$" ] = 'index.php?product_cat=' . $category['slug'] . '&paged=$matches[1]';
                
            

Leave a Reply

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.