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


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!

Comments are closed.