Last active
December 8, 2021 16:10
-
-
Save 2ndkauboy/36fdaa1107a8b31822c8 to your computer and use it in GitHub Desktop.
This plugin will limit the number of the shown tags to a custom number
This file contains 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 | |
/** | |
* Plugin Name: WP Tag Cloud Tag Number | |
* Description: This plugin will limit the number of the shown tags to a custom number | |
* Version: 1.0.0 | |
* Author: Bernhard Kau | |
* Author URI: https://kau-boys.de | |
* License: GPLv3 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0 | |
*/ | |
function widget_tag_cloud_tag_count( $args ) { | |
$args['number'] = 15; // change this to the number of tags you want to show | |
return $args; | |
} | |
add_filter( 'widget_tag_cloud_args', 'widget_tag_cloud_tag_count' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment