Mihir . info

PROGRAMMER – ENTREPRENEUR – NATURE PHOTOGRAPHER

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • About

Tag Archives: wp_query

Troubleshooting: orderby=’rand’ not working in WP_Query

Posted on September 16, 2013 by Mihir

If you are developing in WordPress and can’t get the orderby=’rand’, adding the following line before your query might solve your issue.

remove_all_filters('posts_orderby');

This function basically removes all hooks from the specified filter, so your query is not influenced by any other filter (control of any plugin or theme).

Happy coding!

Posted in Development, Wordpress.

Categories

  • .net
  • Development
  • Inspirational
  • Miscellaneous
  • Other
  • Thought Of The Day
  • Wordpress

My Photography

Sorry, you need to be authorized to see this.

Tags

5060 best domain parking best hosting provider best linux hosting provider c# httpwebrequest ignore ssl error connection error domain name parking domain park domain parking domain parking revenue domain parking script domain parking service domain parking software free domain parking google domain parking hostgator.com coupon hostgator coupon hostgator discount hostgator review httpwebrequest ignore ssl error httpwebrequest ssl error internet call with nokia e71 jumblo newtwitter bug nokia e71 paid domain parking parking domain send my internet call id sip sip.jumblo.com things to consider while selecting your hosting provider twitter bug udp unable to register vb.net httpwebrequest ignore ssl error vb.net httpwebrequest ssl error voip web hosting guide webhostingpad.com coupon webhostingpad.com review webhostingpad review wepay wepay experience wepay review wepay vs paypal

Blogroll

  • cPanel iPhone
  • SpendLess – Shop at discount
© 2021 Mihir . info, all rights reserved.
Proudly powered by WordPress