Organizing Your Pages

I think you may be confusing parent pages (hierarchy) with page slugs (the URL). Parent pages are designed to allow you to programmatically build things like menus/submenus and breadcrumbs. Whereas a page slug is the visual representation in the URL. Many times, of course, I’d recommend you make your page slug match your hierarchy (for … Read more

Passing the JQuery string to Worldpress URL

The tutorial is outdated and it seems it missed to flush the rules. function add_rewrite_rule_and_tag() { global $wp_rewrite; add_rewrite_rule( ‘^physician-profile/([^/]*)/?’, ‘physician-profile?lastName=$matches[1]’, ‘top’ ); add_rewrite_tag( ‘%lastName%’,'([^&]+)’ ); if ( ! isset( $wp_rewrite->rules[‘^physician-profile/([^/]*)/?’] ) ) $wp_rewrite->flush_rules(); return; } add_action( ‘init’, ‘add_rewrite_rule_and_tag’, 99 ); You can access the query var `lastName´ with gloabl $wp_query; $lastName = $wp_query->query_vars[‘lastName’];