Title: bmtm's Replies | WordPress.org

---

# bmtm

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sorting query results by value of custom key](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/)
 *  Thread Starter [bmtm](https://wordpress.org/support/users/bmtm/)
 * (@bmtm)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/#post-1370940)
 * I had to close the final php tag, but after that it worked great for me.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sorting query results by value of custom key](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/)
 *  Thread Starter [bmtm](https://wordpress.org/support/users/bmtm/)
 * (@bmtm)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/#post-1370889)
 * It works! t31os, you are a genius. And a generous one at that! I can’t believe
   you even tagged each line for me. I can’t thank you enough!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sorting query results by value of custom key](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/)
 *  Thread Starter [bmtm](https://wordpress.org/support/users/bmtm/)
 * (@bmtm)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/#post-1370844)
 * Your understanding is exactly right, t31os. I’d like posts with or without the
   custom value to be mixed together, sorted by whichever value is being returned(
   title for most, “recipe_name” for the rest). Following t31os’s model:
 * _Apple pie_ (no meta-tag)
    _The best muffin I ever ate_ (recipe_name = Blueberry
   muffin) _Coffee cake_ (no meta-tag)
 * is showing up as
 * _Apple Pie
    Coffee cake Blueberry muffin
 * but I’d like it to be
 * _Apple Pie
    Blueberry muffin Coffee cake
 * Thanks again for your help with this!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sorting query results by value of custom key](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/)
 *  Thread Starter [bmtm](https://wordpress.org/support/users/bmtm/)
 * (@bmtm)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/sorting-query-results-by-value-of-custom-key/#post-1370757)
 * MichaelH: I’d like to include those posts, but each of those is listed by its
   post title not the “recipe_name” value.
 * ts31os_: I had a feeling that might be the only solution. I haven’t worked with
   arrays before (my PHP knowledge has all been gleaned from WP tinkering), so I
   would REALLY appreciate an example. I’m fairly proud of the code I came up with
   but I’m happy to scrap the whole thing for an easier approach.
 * Thank you both!

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