I've set my permalinks to a custom structure:
/%menutype%/%postname%/
This works all right for my custom taxonomy (menutype) and anything that's an archive.
Now however, simple pages won't work, i.e.
index.php?page_id=32 -> 404!
OR
/about/ ->404
Here are my custom rewrite rules, 'menu' is my custom post, and 'menutype' is my custom taxonomy:
function custom_rewrite( $wp_rewrite ) {
$feed_rules = array(
'menu/[a-z]+/(.+)' => 'index.php?menu=' . $wp_rewrite->preg_index(1),
'menu/([^/]+)(/[0-9]+)?/?$' => 'index.php?menutype=' . $wp_rewrite->preg_index(1),
'/(.+)/' => 'index.php?page_id=' . $wp_rewrite->preg_index(1),
);
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
}
// refresh/flush permalinks in the dashboard if this is changed in any way
add_filter( 'generate_rewrite_rules', 'custom_rewrite' );