Title: Plugin doesn&#039;t order by views
Last modified: August 22, 2016

---

# Plugin doesn't order by views

 *  [mbehal.cz](https://wordpress.org/support/users/mbehalcz/)
 * (@mbehalcz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/)
 * Hello, I have a problem with ordering posts by default. I tried to add order 
   by views but it doesn’t work anyway.
 * You can watch it here [http://mixchuti.cz/category/obrazky/](http://mixchuti.cz/category/obrazky/)
 * You can click for den (day), týden (week) or měsíc (month). Noone works properly,
   you can see views on left top image.
 * Thanks for your advice,
    Michal
 * [https://wordpress.org/plugins/wordpress-popular-posts/](https://wordpress.org/plugins/wordpress-popular-posts/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505271)
 * Hi Michal,
 * Could you please post your code (wpp shortcode or wpp_get_mostpopular() template
   tag) here so I can take a look into it?
 *  Thread Starter [mbehal.cz](https://wordpress.org/support/users/mbehalcz/)
 * (@mbehalcz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505272)
 * Sure:
 * `<?php wpp_get_mostpopular("range=daily&stats_views=1&cat=998&title_length=0&
   thumbnail_width=150&post_html='<li>{thumb}<div>{stats}</div></li>'"); ?>`
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505289)
 * I’m unable to reproduce this issue. For me, the thumbnails are ordered by views:
   [screenshot](http://oi59.tinypic.com/30wbgp2.jpg).
 * Try disabling all of your plugins and check if the problem persists.
 *  Thread Starter [mbehal.cz](https://wordpress.org/support/users/mbehalcz/)
 * (@mbehalcz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505303)
 * I tried disable all plugins, but code still doesn’t work.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505306)
 * The same happens if you switch to a different theme? (eg. Twenty Thirteen). How
   about the stats section? Are posts not ordered by views there as well?
 *  Thread Starter [mbehal.cz](https://wordpress.org/support/users/mbehalcz/)
 * (@mbehalcz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505307)
 * I found the problem actually. Stats are ordering ok.
 * Problem is with category. Without this code “&cat=998” it shows well ordered.
 * Anyway I don’t know how to fix this with category code.
 * Do you have same query posts in you code, where I can put category select? I 
   need this plugin only for this category, so it doesn’t mind if it won’t work 
   for others.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505308)
 * That’s odd. During my tests I also used the cat parameter and everything worked
   as expected – of course, I use dummy data during my tests so I may be overlooking
   something.
 * Is there any chance I can get a copy of your site’s database? That way, I may
   be able to reproduce the issue locally and fix it. If you’re OK with that, please
   get in touch with me via hcabrerab at gmail and let’s continue from there.
 *  Thread Starter [mbehal.cz](https://wordpress.org/support/users/mbehalcz/)
 * (@mbehalcz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505310)
 * I’m just a webdesigner and coder for this web, so I have to contact web owner
   with that. I’ll let you know, when he write me back.
 * Thanks for you help for now and have a good day,
    Michal
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505318)
 * Alright, please keep me posted.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Plugin doesn't order by views’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-order-by-views/#post-5505318)
 * Status: not resolved