You can add a filter via the theme’s functions.php file (I’d recommend you use a child-theme for customizations, but that’s outside the scope of this question)
The following will limit the tag-cloud in the wp-admin backend to the first 5.
function tryme($tag_data){
$short_tag_data = array_slice($tag_data, 0, 5, true);
return $short_tag_data;
}
add_filter( 'wp_generate_tag_cloud_data', 'tryme' );
We can take this a step further & allow only specific tags…
function tryagain($tag_data){
$only_these_tags = array( 'keep-this-tag', 'and-this-tag' ); // A list of the slugs of the tags we want to keep
$short_tag_data = array(); // an empty placeholder for our new array
foreach ( $tag_data as $tag ) {
if ( in_array ( $tag['slug'], $only_these_tags ) ) {
array_push( $short_tag_data, $tag );
}
}
return $short_tag_data;
}
add_filter( 'wp_generate_tag_cloud_data', 'tryagain' );
Related Posts:
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- Add a custom button with custom link after add to cart for every product
- Woocommerce Multisite Search Mod to archive.php but no pagination
- Extend Woocommerce rest api routes fails
- Redirect woocommerce single-product page
- Remove action on product archive page [closed]
- WooCommerce showing star rating review instead of text review string
- Username field is not shown in Woocommerce’s registration contact form
- Woocommerce Membership Expiry Date
- Get WooCommerce product attribute taxonomies in a SQL query on WordPress database
- how to add custom button on product
- Custom Redirect after registration in WooCommerce
- Show all author products from specific category
- Sort orders by custom order meta – Woocommerce Orders admin page
- Redirect user to cart page when add to cart button is clicked
- how i can add more required * fields in checkout page?
- Disable Local Attributes woo commerce
- What will make Woocommerce REST API to issue 401 [closed]
- Woocommerce set cookie after a sale [closed]
- How to upload images from wordpress front-end (the first image must be thumbnail and the rest without first must be in gallery woocommerce product)
- Problems with varibel price [closed]
- Custom Admin Email Subject for Woocommerce (3.8.0) Orders
- Woocommerce custom endpoints
- the_widget() – filter only one instance
- WooCommerce – Exclude category from snippet
- Replacing products on Woocommerce Product Category with Search Results from SearchWP [closed]
- Creating custom permalink tags for WooCommerce
- Add Custom Slug Tags Per Page
- How to override Woocommerce functionality in Reports section?
- how can use woocommerce add to cart popup?
- wc_get_products() not return the images details
- Adding Product Name on Admin Panel Order list and User’s My-Account Order List
- How to put Stripe first, PayPal second on the checkout page?
- How to change product thumbnail size in storefront theme
- woocommerce – how to get product link by id
- woocommerce_register_post action not firing [closed]
- Add SKU in Product Title
- Search in 1) Post, 2) Products (woocommerce) and 3) Custom post type or Taxonomy type on a single page
- Woocommerce REST API – add filter to set maximum query per page for product brands [closed]
- display product’s category static slider name and image in loop wordpress
- Whitespace between product image and gallery on initial load of lightbox product page
- Why is my WordPress login credentials missing, but work with WooCommerce?
- Update Customer JWT Woocommerce
- Send admin new order email to logged in user as well
- How to reverse/swap the order of “Sales price” and “Regular prcie” in woocommerce?
- Woocommerce Canceled Order Notification email to admin
- Woocommerce before and after shop loop not works
- WooCommerce Admin order – Only run action if user is loaded
- Creating child theme out of Coeur
- Hide sidebar and change layout Blog Page using is_page() function
- Change Out of Stock Error Message in WooCommerce Cart
- I want a simple dropdown for locations in woocommerce
- Getting hundreds of spam orders in WooCommerce with failed stripe payment [closed]
- How to fetch woocommerce highest price and lowest price in custom template page?
- Please help me get rid of conflict with the JavaScript – I’m using WooCommerce with product blocks (Gutenb)
- Order Status without Email check. Only with Order-Number
- WooCommerce pagination: remove ‘page’ from url
- Coupon for product / woocommerce
- How can I show “sold out” instead of “out of stock” for some products with particular tags and categories [closed]
- wc_get_product_id_by_sku() returns 0 for products added programatically via update_post_meta
- Display “Add to basket” and “Read more” buttons in the products shop page with woocommerce
- How Can I fix Woocommerce Billing Address Field? [closed]
- Assign user role by text field in WordPress (Woocommerce) [closed]
- check shipping amount in woocommerce_after_checkout_validation?
- How to display woocommerce product details on wp page
- How to set up dynamic purchase pixel in Woocommerce?
- MySQL error or data corruption after database migration
- My products are showing “not in stock” and I don’t know why
- Woocommerce change the price of products in the database
- Select all products that have a custom field ‘is_new’ set to ‘Yes’
- Woocommerce – Shop can’t find products after domain name change
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Removing Product from Woocommerce checkout page using Ajax
- add_post_meta on subcription renewal
- login or register then access woocommerce website
- Move woocommerce shop page image to left
- WooCommerce Tax Filter Not Working
- WooCommerce does not translate every string
- Replace product link with just product name on WooCommerce downloads page
- Woocommerce Product category base same as product base causes 404
- Categories and products in cart Woocommerce
- SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
- How Fragile Is DB if I Upload Completely Updated Files
- Broken 302 redirection for product subcategory (Woocommerce, Apache)
- Update Custom Post Meta Even if Draft
- Clone and modify Woocommerce Products catalog
- Custom CSS Not working on Product page
- How to add ajax loading icon after click add to cart button on woocommerce
- Can’t display product categories on woocommerce getting Invalid taxonomy?
- Send form data to functions.php
- Override woocommerce template from parent theme
- Create custom add to cart in WordPress
- WooCommerce – How to add a custom field to only a specific email template [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- How do I remove the recurring total from thank you for your order email?
- I want to Display custom woocomerce meta box in orders list
- Detect Product Type with code
- Verify if woocommerce supports this design [closed]
- Hook for Woocommerce checkout fields