im trying to get this to work for 3 different pages
it was working fine with 1 rewrite, then when i added 2 more its not working for any of them.
heres the code:
function add_video_rewrite ()
{
add_rewrite_tag("%video_id%", '([^/]*)');
add_rewrite_tag("%video_slug%", '([^/]*)');
add_rewrite_rule('^video/([^/]*)/([^/]*)', 'video/?video_id=$matches[1]&video_slug=$matches[2]', 'bottom');
}
add_action( 'init', 'add_video_rewrite' );
function add_team_rewrite ()
{
add_rewrite_tag("%team_id%", '([^/]*)');
add_rewrite_tag("%team_slug%", '([^/]*)');
add_rewrite_rule('^videos/team/([^/]*)/([^/]*)', 'videos/?team_id=$matches[1]&team_slug=$matches[2]', 'bottom');
}
add_action( 'init', 'add_team_rewrite' );
function add_league_rewrite ()
{
add_rewrite_tag("%league_id%", '([^/]*)');
add_rewrite_tag("%league_slug%", '([^/]*)');
add_rewrite_rule('^videos/league/([^/]*)/([^/]*)', 'videos/?league_id=$matches[1]&league_slug=$matches[2]', 'bottom');
}
add_action( 'init', 'add_league_rewrite' );