Rewrite rules for varying nested terms of custom taxonomy
Take a look at this plugin. It provides hierarchical URLs for categories, but you can easily adapt to any taxonomy.
Take a look at this plugin. It provides hierarchical URLs for categories, but you can easily adapt to any taxonomy.
Permalinks only for posts
URL Rewrite with Custom Variables
404 (category, pages, archives) when using custom rewrite rules
Customise particular RSS permalink
Filter ‘term_link’. Sample code, not tested: add_filter( ‘term_link’, ‘wpse_72848_change_tag_slug’, 10, 3 ); function wpse_72848_change_tag_slug( $termlink, $term, $taxonomy ) { if ( ‘post_tag’ !== $taxonomy ) return $termlink; if ( ‘product’ === $term->slug ) return str_replace( ‘/product/’, ‘/product-powerpoint-ppt/’, $termlink ); return $termlink; }
Help with multisite redirect issues using Cherokee OR solid nginx config?
Within your rewrite() method add: add_rewrite_tag(‘%state%’,'([^&]+)’); add_rewrite_tag(‘%city%’,'([^&]+)’); That will keep the query_vars you added within the url, and prevent it from being stripped.
Rewriting single post url; add_rewrite_rule problem?
Is your Blog page the one that’s set in the back end at Settings > Reading > Posts page? If so, try checking for that in your first function: /* Add .htm extension to Page URL Links */ add_action(‘init’, ‘htm_page_permalink’, -1); function htm_page_permalink() { global $post; if( get_option( ‘page_for_posts’ ) == $post->ID ) { // … Read more