wordpress category rewrite rule with pagination

I was able to solve it doing these rewrites in the following order. So I specified 3 category url in the beginning then 2 category url below that and in the and single category url /combine/brand/category1/category2/page/1-9/ add_rewrite_rule( ‘^combine/([^/]*)/([^/]*)/([^/]*)/page/([0-9]*)$/’,’index.php?category_name=$matches[1]+$matches[2]+$matches[3]&paged=$matches[4]’, ‘top’ ); /combine/brand/category1/page/1-9 add_rewrite_rule( ‘^combine/([^/]*)/([^/]*)/page/([0-9]*)$’,’index.php?category_name=$matches[1]+$matches[2]&paged=$matches[3]’, ‘top’ ); /combine/brand/category1/ add_rewrite_rule( ‘^combine/([^/]*)/?([^/]*)/([^/]*)/?’,’index.php?category_name=$matches[1]+$matches[2]+$matches[3]’, ‘top’ );

help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]

You should use get_query_var rather than $_GET. But you will need to register you custom variables, for instance: add_filter(‘query_vars’, ‘register_my_query_vars’ ); function register_my_query_vars( $qvars ){ //Add these query variables $qvars[] = ‘video_id’; $qvars[] = ‘vide_title’; $qvars[] = ‘venue_src’; return $qvars; } Then you should be able to use get_query_var(‘venue_id’).

Custom Taxonomy in Permalink from post type

Set your taxonomy slug to taxonomy_name and in your post type set the slug to taxonomy_name/%taxonomy_name_term% and flush rewrite rules (simply by going to permalink settings panel in the admin) And after that WordPress will be able to handle /taxonomy_name/%taxonomy_name_term%/post-name/ URLs. So all that is left to do is tell WordPress what %taxonomy_name_term% means and … Read more

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’);