Yet Another Related Posts Plugin (YARPP)
[resolved] orderby error (3 posts)

  1. dawnwire
    Posted 3 years ago #

    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.

    				            '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'


  2. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 3 years ago #

    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!

  3. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 3 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic