Custom urls in WordPress involving page slugs

This exact piece of code works, the reason for redirect was some other plugin. To create as many child pages you want dynamically you just need to this just hook it to ‘init’ hook. add_action(‘init’,’my_custom_rewrite_rules’ ); function my_custom_rewrite_rules(){ add_rewrite_tag( ‘%make%’, ‘([^/]+)’ ); add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?make=$matches[1]’,’top’); //or To go to a published page. add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?pagename=page-slug&make=$matches[1]’,’top’); } If you want … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)