I’m having a hard time forcing a rewrite rule with certain criteria in wordpress, and I’m really hoping that someone can help…
The URL structure for the category is as follows
I want to add a rewrite rule by adding
add_rewrite_ruleto functions.php to allow one Arabic character like the following
But the regex must be for one and only one character because there are articles inside that category, thus, if there is anything else that is not a single character it will be a post.
I already implemented that but for the English language using the following code
$wp->add_query_var('letter'); add_rewrite_rule( '(mycategory)(/s*[a-zA-Z])?/?$','index.php?category_name=$matches&letter=$matches','top' );
Thanks in advance.
- The topic ‘Add rewrite rule with one unicode character’ is closed to new replies.