add_rewrite_rule and custom variable
Hi @westondeboer: Since you are saying your post type is ‘portfolio’ here’s what works on my WordPress v3.0.4 test site with a ‘portfolio’ custom post type defined. It replaces all the code you have: add_action(‘init’,’yoursite_init’); function yoursite_init() { global $wp,$wp_rewrite; $wp->add_query_var(‘view’); $wp_rewrite->add_rule(‘portfolio/([^/]+)/all’, ‘index.php?view=all&post_type=portfolio&name=$matches[1]’, ‘top’); // Once you get working, remove this next line $wp_rewrite->flush_rules(false); } … Read more