GsmLobo-rio
Forum Replies Created
-
Forum: Plugins
In reply to: [Cloudinary - Deliver Images and Videos at Scale] Using the Plugin in VPSWhen I install the plugin into a VPS, what do I have to do to work perfectly?
Since the installation was done by wp-cli from WordPress!Forum: Developing with WordPress
In reply to: Sort category at random?Thanks a lot for the help!
I found the solution that meets my need, I use the get_categories () function, loop the result, store the term_id into an array, and then use the function (http://php.net/manual/pt_BR/function.shuffle .php) from php to shuffle the result, this way I always have the same result without a single order !!!Forum: Developing with WordPress
In reply to: Sort category at random?Okay, now I’ll have to think of a way to store this first result in a variable and then apply array_rand () on this variable.
I’ll do my tests here !!
Thanks a lot for the help!
–
–
Using array_rand () does not work, because in get_categories I get six positions and when I use the array_rand () function, it always repeats one or more positions, I was only wanting to change the order I get, These positions changed.- This reply was modified 9 years, 2 months ago by GsmLobo-rio.
Forum: Developing with WordPress
In reply to: Sort category at random?In my case it does not work, as I need the random sorting of the categories to use the category name in a new query within the posts.
In this example, I’ll be using the posts first, when I want to use the categories and the categories link that I ask the posts.
Understood?
Thanks for trying to help.Consegui resolver!!!