Rewriting urls for subcategories in wordpress -


i have problem rewriting urls in wordpress page.

add_rewrite_rule( '([^/]+)/popular', 'index.php?category_name=$matches[1]&popular=yes', 'top' ); 

it works fine 1 category

but have subcategories , doesn't work:

add_rewrite_rule( '([^/]+)/popular', 'index.php?category_name=$matches[1]/$matches[2]&popular=yes', 'top' ); 

should change sth in line?

regards


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -