Woocommerce subcategory 404
Woocommerce subcategory 404
Woocommerce subcategory 404
SEO: shortening permalinks to five words
I had the same issue and your fix helped me a lot. After I fixed the issue with your solution I figured out that I had used a permalink in one custom post type that caused the issue. I used years / year and I think because wordpress uses something like this in its archive … Read more
Use custom post meta in permalink
Additional section in custom post type permalink
Register your taxonomy first and set the argument slug and rewrite rules to your slug which is city Register your post type with slug of your taxonomy city prefixed and make sure you set the has_archive argument to taxonomy. Now add a filter to post_type_link to make the stores show the individual permalink. register_post_type( ‘city’, … Read more
Integrating wordpress into existing site and setting up htaccess?
Two things need to be done. First, make your posts URL is different using the post_link filter. function _20170117_post_link( $url, $post, $leavename ) { if( in_category( ‘news’, $post) ) { $url = get_site_url() . ‘/news/’ . $post->post_name ; } return $url; } add_filter( ‘post_link’, ‘_20170117_post_link’, 10, 3 ); Second, make the rewrite rule for this: … Read more
You can set up simple tax/cpt permalinks with the rewrite argument when you register the post type: function wpd_product_brand_types() { register_taxonomy( ‘brand’, ‘product’, array( ‘rewrite’ => array( ‘slug’ => ‘brand’, ‘with_front’ => false ) ) ); register_post_type( ‘product’, array( ‘label’ => ‘Products’, ‘public’ => true, ‘supports’ => array( ‘title’ ), ‘rewrite’ => array( ‘slug’ => … Read more
Mod_Rewrite to show only last subcategory in URL