can I used slug instead of ID in add_rewrite_rule?
-
question can I just used slug name instead of id for this kind of add_rewrite_rule
add_rewrite_rule('news/([^/]+)/?$','index.php?page_id=$matches[1]','top');
I’m not sure if what parameters for the slug in query, what I see on several samples are page_id only and I cannot find any information for slug.
thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘can I used slug instead of ID in add_rewrite_rule?’ is closed to new replies.