Adding custom slugs: parent-page/username/child-page/

Found the solution! I was trying to over complicate things. The best method I’ve come up with is: $users=get_page_by_title(‘users’); $about=get_page_by_title(‘about’); add_rewrite_rule(‘^users/([^/]*)$’,’index.php?page_id=’.$users->ID.’&username=$matches[1]’,’top’); add_rewrite_rule(‘^users/([^/]*)/about/?’,’index.php?page_id=’.$about->ID.’&username=$matches[1]’,’top’); Haven’t come up with errors yet, haven’t tested yet!

add_rewrite_rule doesn’t work for me

You’ve got it the wrong way round – WordPress won’t rewrite (redirect) your query string (known as canonicalization), but it will pass your parameters through if you use the rewritten URL: http://example.com/test/information/people Now if you print_r( $wp-query_vars ) in your template, you should get something like: Array ( [pagename] => test [information] => people ) … Read more

Where is wordpress redirecting wp-admin/admin/dashboard to wp-admin and how to turn it off

you can remove this functionality by adding this code in a plugin or theme remove_action( ‘template_redirect’, ‘wp_redirect_admin_locations’, 1000 ); This will remove all of dashboar, login, admin so if you will want some of them to still be there you will have to write your own replacement function to wp_redirect_admin_locations and hook it after you … Read more

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