Custom rewrite url structure for several custom taxonomy (NOT pos_type)

The rewrite rules to resolve these requests are fairly simple: function wpd_property_rules(){ add_rewrite_rule( ‘property-city/([^/]+)/([^/]+)/page/?([0-9]{1,})/?$’, ‘index.php?property_city=$matches[1]&property_type=$matches[2]&paged=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘property-city/([^/]+)/([^/]+)/?$’, ‘index.php?property_city=$matches[1]&property_type=$matches[2]’, ‘top’ ); } add_action( ‘init’, ‘wpd_property_rules’ ); There are a couple of problems though. You’ll need to generate these links somehow, but there’s no relationship between two taxonomies except by looking at all posts to … Read more

Prevent Archive URLs

WordPress generates date archives automatically, it’s just a thing it does. You see the index.php template probably because there isn’t a more specific one for date archives in your current theme. There are plugins that disable these archives, Yoast SEO is one. A quick fix is to empty the date archive rewrite rules: add_filter( ‘date_rewrite_rules’, … Read more

Display categorised url

O’ I got it from godaddy.com. A blank page should be made first with the name SOMETHING1. Open the desired page, say New_Page. Open Page Attributes on the right side and select SOMETHNG1 from the Parent dropdown. This will create the permalink like this: domain/SOMETHING1/New_Page. The same procedure can be done in case of other … Read more