Skip to content

Instantly share code, notes, and snippets.

@imemohit
Last active August 29, 2015 14:10
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 imemohit/700ec7aab9b30ab629b5 to your computer and use it in GitHub Desktop.
Save imemohit/700ec7aab9b30ab629b5 to your computer and use it in GitHub Desktop.
add_filter( 'dt_menu_options', 'custom_menu_filter' );
function custom_menu_filter( $options = array() ) {
if(is_page( 42 )) {
$options['location'] = 'foo';
}
if(is_category( )) {
$options['location'] = 'bar';
}
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment