Skip to content

Instantly share code, notes, and snippets.

@yoren
Last active April 20, 2020 15:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoren/a94b6b0f61d8527ec35e67327340a9aa to your computer and use it in GitHub Desktop.
Save yoren/a94b6b0f61d8527ec35e67327340a9aa to your computer and use it in GitHub Desktop.
Changing arguments for the built-in taxonomies in WordPress
<?php
function ofix_register_tax_args( $args, $taxonomy, $object_type ) {
if ( 'link_category' === $taxonomy ) {
$args['public'] = true;
$args['query_var'] = true;
}
return $args;
}
add_filter( 'register_taxonomy_args', 'ofix_register_tax_args', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment