I’m doing custom URL rewrites according to this method , which work beautifully. But as a result my regular post permalinks are broken.
So, I’m rewriting “/pagename/1232432” into “/pagename?param=1232432” like this:
$wp_rewrite->add_rewrite_tag( $rewrite_tag, '(.+)', 'param=' );
$rewrite_keywords_structure = $wp_rewrite->root . "%pagename%/$rewrite_tag/";
(plus all the surrounding code from the example in the link above). Works fine. However, my normal posts like “/2011/03/hello-world/” no longer work.
Any ideas?
Cheers
MickP
Well I solved it – in a rather unsatisfactory way – by explicitly re-defining the default posts rule in my own code. i.e.
I don’t really understand why this is necessary, but there you go.
Have you tried to flush your permalinks?
Visiting
Admin > Settings > Permalinks
should do it.