Tag Info

New answers tagged

0

The old permalinks still work because the rewrite rules that support those permalinks still exist. When you register a post type, setting the rewrite argument generates the rules to resolve incoming requests. Rather than adding new rules in addition to the originals, just alter the original post type registration.


1

You should be able to use category_name=$matches[1] instead of cat=$matches[1] Generally speaking, you can use any built-in public query variable and custom ones, after some additional work, see the add_rewrite_rule() codex entry for more information.


1

Let me say beforehand that when using add_rewrite_rule() nothing is written to the htaccess file. Rewrite rules are stored in the database and handled by WordPress internally on PHP level. TL;DR: Rewrite rules do persist after plugin deletion, but probably not the way you'd expect it. When using add_rewrite_rule these rules are added in the options table ...



Top 50 recent answers are included