Title: orderby error
Last modified: August 21, 2016

---

# orderby error

 *  Resolved [dawnwire](https://wordpress.org/support/users/dawnwire/)
 * (@dawnwire)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/orderby-error/)
 * I’ve been debugging my theme and keep getting this error for my results:
 * Notice: Undefined index: orderby in /mysite/www/wp-content/plugins/yet-another-
   related-posts-plugin/class-cache.php on line 122
 * Here’s what I’m using. Order is the default score but I’ve tried other parameters
   getting the same error. I don’t use the default category or post_tag, so I’ve
   had to explicitly state my new taxonomies in the arguments below.
 *     ```
       yarpp_related(array(
       				            'post_type' => array('column','video','cartoon'),
       				            'template' => 'yarpp-template-riotwire-vertical-thumbs.php', 
   
       				             'require_tax' => array(
                                         'topic' => 0 //is this correct?
                                     ),
       				              'weight' => array(
                                            'body' => 1,
                                            'title' => 2, // larger weights mean this criteria will be weighted more heavily
                                            'tax' => array(
                                               'location' => 1,
                                               'topic' => 4,
                                               'issue' => 3,
                                             )
                                     ),
                                     'threshold' => 1,   // The threshold which must be met by the "match score"
       				             'limit' => 3,
       				             'order' => 'score DESC'
   
       				            )
       				      );
                  }
       ```
   
 * [http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/)

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

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/orderby-error/#post-3716346)
 * Thanks for reporting this here. It’s not immediately obvious that there would
   be any problem with the code you posted here, so I’ll try running it myself to
   investigate. Thanks!
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/orderby-error/#post-3716466)
 * I just touched up the code to try to be more robust against different input to
   the API. Please see if this new version helps your situation.
 * [http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.4.0.7b1.zip](http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.4.0.7b1.zip)

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

The topic ‘orderby error’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

## Tags

 * [YARPP](https://wordpress.org/support/topic-tag/yarpp/)

 * 2 replies
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/orderby-error/#post-3716466)
 * Status: resolved