Title: Order by Count shortcode
Last modified: January 30, 2021

---

# Order by Count shortcode

 *  [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/)
 * Hi,
    I saw your post of almost 2 years ago on the same topic and changed the **
   order_by** to **orderby**, but this still isn’t working. On the page it is still
   showing the tags sorted by name and ascending.
 * I need it ordered by count and descending.
 * My settings are:
    [cool_tag_cloud number=”25″ orderby=”count” order=”DESC” taxonomy
   =”list-tags” style=”silver”]
 * Your assistance would be highly appreciated.
 * By the way, great plug-in!!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Forder-by-count-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/order-by-count-shortcode/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/order-by-count-shortcode/page/2/?output_format=md)

 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13981580)
 * Hi [@raybez](https://wordpress.org/support/users/raybez/)
 * Does it work in the widget (instaed of a shortcode). Let me know, that’ll give
   me an idea as to where to look for the cause of the issue.
 * > By the way, great plug-in!!!
 * Thank you, happy to hear that.
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13981806)
 * Hi,
 * Thanks for getting back to me so quickly.
 * I can’t use it as a widget as the taxonomy=”list-tags” doesn’t show up as an 
   option. (It is a custom tag created by the ListingPro theme.)
 * I therefore have to use it in its shortcode form.
 * It would be great if the widget could identify custom taxonomies and have it 
   in the dropdown list as an option…
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13981936)
 * OK, so I did a bit more testing and saw that TAGS were listed twice in teh dropdown
   list, so I selected the second one and it now shows the custom tags. BUT the 
   order is still incorrect in the widget so it is both the shortcode and widget
   that works the same.
 * It is kind of strange how it works.
 * When I order by name or count then it takes the first 25 items of the entire 
   tag list and orders it descending or ascending. It is like it never takes the
   entire tags list into consideration; it is always only the top 25 items that 
   gets displayed.
 * I also think that because the top 25 all have a count of 1 it makes no difference
   whether I order by name or count…
 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13985725)
 * Hi [@raybez](https://wordpress.org/support/users/raybez/)
 * The taxonomy selection in the widget shows all the registered taxonomies. Names
   can be duplicated since it’s the name that is set for the custom taxonomy, we
   don’t modify the names and often developers just use “Tags” and “Categories” 
   for names of custom taxonomies, I do that as well. Will see if there’s a way 
   to help differentiate which taxonomy comes from where.
 * –
 * As for taking the first 25 items it finds and ordering those (instead of all 
   items), that should be the case only with the random order (limitation of the`
   wp_tag_cloud()` WordPress function). It randomizes the order of the first X amount
   of tags it finds.
 * But for order by name and count it should actually take all tags into account.
 * –
 * > I also think that because the top 25 all have a count of 1 it makes no difference
   > whether I order by name or count…
 * If you add one of tags to be on 2 posts, does it show as the first tag in the
   list?
 * **Edit:**
 * I probably misunderstood that last part. Do you have tags with more than 1 post
   on them?
    -  This reply was modified 5 years, 3 months ago by [WPKube](https://wordpress.org/support/users/wpkube/).
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13985800)
 * Yes I do.
 * There are 2,894 tags and some have up to 6 posts associated with it. It is these
   that I want to show in the cloud.
 * I therefore need the tags sorted by count and descending.
 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13990456)
 * Hi [@raybez](https://wordpress.org/support/users/raybez/)
 * Did some tests and it seems that the WordPress `wp_tag_cloud()` function has 
   a problem with ordering custom taxonomies by count. Regular tags/categories work
   but custom taxonomies don’t.
 * I’ll look into it and figure out a way to resolve that issue. Will keep you informed.
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-13990830)
 * Aah brilliant, so I am not going insane.
 * Thanks and waiting in anticipation.
 *  [David](https://wordpress.org/support/users/loano1/)
 * (@loano1)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14164151)
 * Hello [@wpkube](https://wordpress.org/support/users/wpkube/) ,
 * I’m having the same issue, order by count does not work and I’m not using a custom
   taxonomie. (Also placed it via shortcode)
 * How my order should be (visualized by size): [https://prnt.sc/10idarf](https://prnt.sc/10idarf)
 * E.g. Baby and Tipps would be the top spots. But actually it’s sorted by alphabet:
   [https://prnt.sc/10ideph](https://prnt.sc/10ideph)
 * Link to my Example: [Link](https://babynews.de/kinderwunsch/ivf-und-icsi-ungewollt-kinderlos/)
 * It would be great if you could find a solution for this. Or have you [@raybez](https://wordpress.org/support/users/raybez/)
   found a solution in the meantime?
 * Thanks!
 *  [hellojoe](https://wordpress.org/support/users/hellojoe/)
 * (@hellojoe)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14165169)
 * Hi [@wpkube](https://wordpress.org/support/users/wpkube/)
 * I too seem to be unable to get ‘count’ to work via shortcode. As far as I am 
   aware I am also not using any form of custom taxonomy.
 * This is a very useful plugin and hoping you can find and fix the issue.
 * Thanks
 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14185521)
 * [@loano1](https://wordpress.org/support/users/loano1/) [@raybez](https://wordpress.org/support/users/raybez/)
 * The plan is to release a new update that fixes that this week.
 * [@hellojoe](https://wordpress.org/support/users/hellojoe/)
 * This specific issue is related to ordering of tags by count, which is a WordPress
   limitation. Showing the count should be unrelated to the order by count, so please
   submit a separate support request for that (to keep things organized) and we’ll
   figure it out.
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14302771)
 * [@wpkube](https://wordpress.org/support/users/wpkube/) Do you have an update 
   on this yet?
 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14313439)
 * Hi [@raybez](https://wordpress.org/support/users/raybez/)
 * Sorry for the wait. Just released a new update, can you please try it out and
   let me know if it resolves the issue.
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14322033)
 * Hi [@wpkube](https://wordpress.org/support/users/wpkube/)
 * Unfortunately the upgrade didn’t solve the issue for me. You can view the tags
   in the center of the page on the home page of [Ashrays](https://www.ashrays.com).
   The shortcode that I use is as follows:
 * `[cool_tag_cloud style="silver" number="8" order_by="count" order=desc" taxonomy
   ="list-tags"]`
 * The order is still asc as these tags have the lowest count.
 *  Plugin Author [WPKube](https://wordpress.org/support/users/wpkube/)
 * (@wpkube)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14326014)
 * Try this:
 * `[cool_tag_cloud style="silver" number="8" orderby="count" order="desc" taxonomy
   ="list-tags"]`
 * The difference is that instead of `order_by` it’s `orderby`
 * And there was a missing quote in the order parameter.
 *  Thread Starter [raybez](https://wordpress.org/support/users/raybez/)
 * (@raybez)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/order-by-count-shortcode/#post-14328443)
 * I can confirm that it is still only sorting by name and not by “count”. Also,
   the order doesn’t change whether I set it to “desc” or “asc”; which is the same
   as before.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/order-by-count-shortcode/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/order-by-count-shortcode/page/2/?output_format=md)

The topic ‘Order by Count shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cool-tag-cloud_f8ebd4.svg)
 * [Cool Tag Cloud](https://wordpress.org/plugins/cool-tag-cloud/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cool-tag-cloud/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cool-tag-cloud/)
 * [Active Topics](https://wordpress.org/support/plugin/cool-tag-cloud/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cool-tag-cloud/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cool-tag-cloud/reviews/)

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)
 * [order](https://wordpress.org/support/topic-tag/order/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 20 replies
 * 4 participants
 * Last reply from: [David](https://wordpress.org/support/users/loano1/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/order-by-count-shortcode/page/2/#post-14628747)
 * Status: not resolved