Append custom parameter to taxonomy/term URI

You can try this: function my_car_rewrite_rules( $rules ) { $newrules = array(); // add a rule for this kind of url: // http://myhost.com/cars/ferrari/used/123 // => http://myhost.com/index.php?post_type=cars&ferrari=used&p=123 $newrules[‘^cars/([^/]+)/([^/]+)/([^/]+)$’] = ‘index.php?post_type=cars&$matches[1]=$matches[2]&p=$matches[3]’; return $newrules + $rules; } add_filter(‘rewrite_rules_array’,’my_car_rewrite_rules’); and remember to “save the permalinks” when testing. I added /cars/ so this rewrite will not overwrite your other pages. … Read more

Rewrite rule help for gallery plugin

I finally got my rewrite rules to work here: $home = get_post(Sunshine::$options[‘page’]); // Gallery add_rewrite_rule($home->post_name.”/gallery/([^/]+)/page/?([0-9]{1,})/?$”,’index.php?pagename=”.$home->post_name.”&sunshine_gallery=$matches[1]&paged=$matches[2]’,’top’); add_rewrite_rule($home->post_name.”/gallery/([^/]+)/?$”,’index.php?p=’.$home->post_name.’&sunshine_gallery=$matches[1]’,’top’); add_rewrite_rule($home->post_name.”/gallery/([^/]+)/?$”,’index.php?pagename=”.$home->post_name.”&sunshine_gallery=$matches[1]’,’top’); // Image add_rewrite_rule($home->post_name.”/image/([^/]+)/?$”,’index.php?pagename=”.$home->post_name.”&sunshine_image=$matches[1]’,’top’);

Create new URL structure for custom post types

Sorted in the end. As Milo suggested I didn’t need the calls to add_rewrite_tag. The following code works: /** * Custom rewrite rules */ function my_rewrite_rules() { add_rewrite_rule( ‘^([^/]*)/([^/]*)/([^/]*)?’, ‘index.php?post_type=room&room=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘^([^/]*)/([^/]*)?’, ‘index.php?post_type=house_type&house_type=$matches[2]’, ‘top’ ); add_rewrite_rule( ‘^([^/]*)/?’, ‘index.php?post_type=development&development=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘my_rewrite_rules’ );

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduedueduseduseduseduedusedusedus