Last active
April 20, 2020 15:38
-
-
Save yoren/a94b6b0f61d8527ec35e67327340a9aa to your computer and use it in GitHub Desktop.
Changing arguments for the built-in taxonomies in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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