Skip to content

Instantly share code, notes, and snippets.

@dendeffe
Created April 21, 2015 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dendeffe/a3d487eca0eb1ce043f8 to your computer and use it in GitHub Desktop.
Save dendeffe/a3d487eca0eb1ce043f8 to your computer and use it in GitHub Desktop.
function setup_custom_rules () {
add_filter( 'rewrite_rules_array','brabo_insert_rules' );
brabo_flush_rules();
}
function brabo_insert_rules( $rules ) {
$newrules = array();
$newrules['^testsortable'] = 'index.php?ba=testsortable';
$combined_rules = $newrules + $rules;
return $combined_rules;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment