2 added 106 characters in body
source | link

Here's a bit of code I wrote to modify the way tags are displayed. All tags are displayed by default, withand the manual add tag box and, as well as "Choose from the most used tags" text, are hidden. It'sThe implementation is a bit clunky, but on the up side it works well and doesn't involve editing core files.

Add this code to your theme's functions.php file:

function example_wpadmin_show_all_tags( $args ) {
    if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && $_POST['action'] === 'get-tagcloud' )
        unset( $args['number'] );
        $args['hide_empty'] = 0;
    return $args;
}
add_filter( 'get_terms_args', 'example_wpadmin_show_all_tags' );
function example_wpadmin_custom_css() {
    echo '<script>
        jQuery(window).load(function() {
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").trigger("click");
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").hide();
        });
    </script>';
    echo '<style>
        body.wp-admin #tagsdiv-post_tag #link-post_tag{visibility:hidden;}
        body.wp-admin #tagsdiv-post_tag #post_tag .jaxtag{display:none;} //this line hides the manual add tag box - delete if not required
        body.wp-admin #tagsdiv-post_tag #tagcloud-post_tag a{display:block;} //this line puts each displayed tag on a new line - delete if not required
    </style>';
}
add_action('admin_head', 'example_wpadmin_custom_css');

If you're using this with WooCommerce Productsproducts instead of standard posts, just replace all instances of "post_tag" with "product_tag". I assume the same applies for all custom post types, but I haven'tI've only tested it with posts and products.

Here's a bit of code I wrote to modify the way tags are displayed. All tags are displayed by default, with the manual add tag box and "Choose from the most used tags" text hidden. It's a bit clunky, but on the up side it doesn't involve editing core files.

function example_wpadmin_show_all_tags( $args ) {
    if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && $_POST['action'] === 'get-tagcloud' )
        unset( $args['number'] );
        $args['hide_empty'] = 0;
    return $args;
}
add_filter( 'get_terms_args', 'example_wpadmin_show_all_tags' );
function example_wpadmin_custom_css() {
    echo '<script>
        jQuery(window).load(function() {
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").trigger("click");
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").hide();
        });
    </script>';
    echo '<style>
        body.wp-admin #tagsdiv-post_tag #link-post_tag{visibility:hidden;}
        body.wp-admin #tagsdiv-post_tag #post_tag .jaxtag{display:none;} //this line hides the manual add tag box - delete if not required
        body.wp-admin #tagsdiv-post_tag #tagcloud-post_tag a{display:block;} //this line puts each displayed tag on a new line - delete if not required
    </style>';
}
add_action('admin_head', 'example_wpadmin_custom_css');

If you're using this with WooCommerce Products instead of standard posts, just replace all instances of "post_tag" with "product_tag". I assume the same applies for all custom post types, but I haven't tested it.

Here's a bit of code I wrote to modify the way tags are displayed. All tags are displayed by default, and the manual add tag box, as well as "Choose from the most used tags" text, are hidden. The implementation is a bit clunky, but it works well and doesn't involve editing core files.

Add this code to your theme's functions.php file:

function example_wpadmin_show_all_tags( $args ) {
    if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && $_POST['action'] === 'get-tagcloud' )
        unset( $args['number'] );
        $args['hide_empty'] = 0;
    return $args;
}
add_filter( 'get_terms_args', 'example_wpadmin_show_all_tags' );
function example_wpadmin_custom_css() {
    echo '<script>
        jQuery(window).load(function() {
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").trigger("click");
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").hide();
        });
    </script>';
    echo '<style>
        body.wp-admin #tagsdiv-post_tag #link-post_tag{visibility:hidden;}
        body.wp-admin #tagsdiv-post_tag #post_tag .jaxtag{display:none;} //this line hides the manual add tag box - delete if not required
        body.wp-admin #tagsdiv-post_tag #tagcloud-post_tag a{display:block;} //this line puts each displayed tag on a new line - delete if not required
    </style>';
}
add_action('admin_head', 'example_wpadmin_custom_css');

If you're using this with WooCommerce products instead of standard posts, just replace all instances of "post_tag" with "product_tag". I assume the same applies for all custom post types, but I've only tested it with posts and products.

1
source | link

Here's a bit of code I wrote to modify the way tags are displayed. All tags are displayed by default, with the manual add tag box and "Choose from the most used tags" text hidden. It's a bit clunky, but on the up side it doesn't involve editing core files.

function example_wpadmin_show_all_tags( $args ) {
    if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && $_POST['action'] === 'get-tagcloud' )
        unset( $args['number'] );
        $args['hide_empty'] = 0;
    return $args;
}
add_filter( 'get_terms_args', 'example_wpadmin_show_all_tags' );
function example_wpadmin_custom_css() {
    echo '<script>
        jQuery(window).load(function() {
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").trigger("click");
            jQuery("body.wp-admin #tagsdiv-post_tag #link-post_tag").hide();
        });
    </script>';
    echo '<style>
        body.wp-admin #tagsdiv-post_tag #link-post_tag{visibility:hidden;}
        body.wp-admin #tagsdiv-post_tag #post_tag .jaxtag{display:none;} //this line hides the manual add tag box - delete if not required
        body.wp-admin #tagsdiv-post_tag #tagcloud-post_tag a{display:block;} //this line puts each displayed tag on a new line - delete if not required
    </style>';
}
add_action('admin_head', 'example_wpadmin_custom_css');

If you're using this with WooCommerce Products instead of standard posts, just replace all instances of "post_tag" with "product_tag". I assume the same applies for all custom post types, but I haven't tested it.