Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This plugin will limit the number of the shown tags to a custom number
<?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_action( '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