template_include not loading -instead goes to index.php
I have the following code: <?php function ex_rewrite_rules(){ //discography query variable rewrite add_rewrite_rule( ‘artists/([^/]+)/discography/?$’, ‘index.php?album_artist=$matches[1]&discography=yes’, ‘top’); //albums rewrite rule add_rewrite_rule( ‘artists/([^/]+)/discography/([^/]+)/?$’, ‘index.php?album_artist=$matches[1]&discography=yes&albums=$matches[2]’, ‘top’ ); //songs rewrite rule add_rewrite_rule( ‘artists/([^/]+)/discography/([^/]+)/([^/]+)/?$’, ‘index.php?album_artist=$matches[1]&discography=yes&albums=$matches[2]&songs=$matches[3]’, ‘top’ ); } add_action(‘init’,’ex_rewrite_rules’); //Function to register query vars function ex_prefix_artists_query_var($vars){ $vars[] = ‘discography’; $vars[] = ‘album_artist’; return $vars; } add_filter(‘query_vars’,’ex_prefix_artists_query_var’); //function to load template … Read more