Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Last active July 6, 2020 10:49
Show Gist options
  • Select an option

  • Save farookibrahim/c39458c6193fa33f6f4b8582f5193f1d to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/c39458c6193fa33f6f4b8582f5193f1d to your computer and use it in GitHub Desktop.
Vodi - Movies Year Filter force 1st page after filter
if( ! function_exists( 'vodi_child_movies_year_filter_link' ) ) {
function vodi_child_movies_year_filter_link( $link ) {
$pattern = '/page\\/[0-9]+\\//i';
$link = preg_replace( $pattern, '', $link );
return $link;
}
}
add_filter( 'masvideos_movies_year_filter_link', 'vodi_child_movies_year_filter_link', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment