Last active
March 10, 2020 06:29
-
-
Save nielsvr/761ed543d16b32a068e52b0ea1cc39c4 to your computer and use it in GitHub Desktop.
Rewrite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Should match /category/s/ | |
// Should match /category/tag/s/ | |
// Should match /category/tag/tag/s/ | |
// Etcetera | |
// https://regex101.com/r/sNfHex/1 | |
add_rewrite_rule("^(.*)\/[s]\/?", "index.php?category_name=$matches[1]", 'top'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment