Title: Minio's Replies | WordPress.org

---

# Minio

  [  ](https://wordpress.org/support/users/minio/)

 *   [Profile](https://wordpress.org/support/users/minio/)
 *   [Topics Started](https://wordpress.org/support/users/minio/topics/)
 *   [Replies Created](https://wordpress.org/support/users/minio/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/minio/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/minio/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/minio/engagements/)
 *   [Favorites](https://wordpress.org/support/users/minio/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Retrieve list of post from each category](https://wordpress.org/support/topic/retrieve-list-of-post-from-each-category/)
 *  Thread Starter [Minio](https://wordpress.org/support/users/minio/)
 * (@minio)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/retrieve-list-of-post-from-each-category/#post-4208290)
 * Yeah, sure.
 * Code itself is available [gist](https://gist.github.com/Minio/6982551) (I am 
   not sure how markup here would handle it).
 * Notice how results are ordered by category slug. This way they are grouped together,
   so you can simply loop through array and print them, possibly with some header
   before each group (just check whether this iteration slug is different than previous
   iteration).
 * Or you can create another array that stores points where categories changes in`
   $all_posts` array. Later you can slice big array into per-category-arrays and
   shuffle them; you will get some randomness in your post list. That’s what I did–
   I shuffled each category array and printed only first 3 posts from each.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Retrieve list of post from each category](https://wordpress.org/support/topic/retrieve-list-of-post-from-each-category/)
 *  Thread Starter [Minio](https://wordpress.org/support/users/minio/)
 * (@minio)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/retrieve-list-of-post-from-each-category/#post-4208271)
 * Thanks for your reply.
 * I am not sure what do you mean when you say about subquery run 20 times. I managed
   to get all needed info with one query and few clever joins. Yes, there is some
   duplicated data in returned array, but I believe it is balanced off by the fact,
   that `$post` objects returned by `get_posts` would contain content of each post
   retrieved.
 * As one can guess, currently I decided to go with direct connection with database
   and processing retrieved results in PHP.
 * But I think it would still be valuable to hear others opinions about this.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Esc key cancels comment – how to disable it?](https://wordpress.org/support/topic/esc-key-cancels-comment-how-to-disable-it/)
 *  Thread Starter [Minio](https://wordpress.org/support/users/minio/)
 * (@minio)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/esc-key-cancels-comment-how-to-disable-it/#post-3205160)
 * Let me answer myself.
 * The code is in wp-admin/js/edit-comments.js (this file is obfuscated; take a 
   look at edit-comments.dev.js first). There is setTimeout function that adds keyup
   event listener to element with id of “replycontent”. You must remove this event
   listener:
 *     ```
       $('#replycontent').focus().keyup(function(e){
          if ( e.which == 27 )
             commentReply.revert(); // close on Escape
          });
       ```
   
 * In obfuscated code, look for “600” (timeout interval). Code that has to be removed
   is just before this number.
 * Unfortunately, it looks like there is no option to switch that setting. You must
   modify your WP files (and do it after every upgrade) or fool around with UserJS.

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