{"id":3716066,"date":"2013-05-02T23:09:49","date_gmt":"2013-05-02T23:09:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/orderby-error\/"},"modified":"2016-08-21T00:41:58","modified_gmt":"2016-08-21T00:41:58","slug":"orderby-error","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/orderby-error\/","title":{"rendered":"orderby error"},"content":{"rendered":"<p>I&#8217;ve been debugging my theme and keep getting this error for my results:<\/p>\n<p>Notice: Undefined index: orderby in \/mysite\/www\/wp-content\/plugins\/yet-another-related-posts-plugin\/class-cache.php on line 122<\/p>\n<p>Here&#8217;s what I&#8217;m using. Order is the default score but I&#8217;ve tried other parameters getting the same error.  I don&#8217;t use the default category or post_tag, so I&#8217;ve had to explicitly state my new taxonomies in the arguments below. <\/p>\n<pre><code>yarpp_related(array(\n\t\t\t\t            &#039;post_type&#039; =&gt; array(&#039;column&#039;,&#039;video&#039;,&#039;cartoon&#039;),\n\t\t\t\t            &#039;template&#039; =&gt; &#039;yarpp-template-riotwire-vertical-thumbs.php&#039;, \n\n\t\t\t\t             &#039;require_tax&#039; =&gt; array(\n                                  &#039;topic&#039; =&gt; 0 \/\/is this correct?\n                              ),\n\t\t\t\t              &#039;weight&#039; =&gt; array(\n                                     &#039;body&#039; =&gt; 1,\n                                     &#039;title&#039; =&gt; 2, \/\/ larger weights mean this criteria will be weighted more heavily\n                                     &#039;tax&#039; =&gt; array(\n                                        &#039;location&#039; =&gt; 1,\n                                        &#039;topic&#039; =&gt; 4,\n                                        &#039;issue&#039; =&gt; 3,\n                                      )\n                              ),\n                              &#039;threshold&#039; =&gt; 1,   \/\/ The threshold which must be met by the &quot;match score&quot;\n\t\t\t\t             &#039;limit&#039; =&gt; 3,\n\t\t\t\t             &#039;order&#039; =&gt; &#039;score DESC&#039;\n\n\t\t\t\t            )\n\t\t\t\t      );\n           }<\/code><\/pre>\n<p>https:\/\/wordpress.org\/extend\/plugins\/yet-another-related-posts-plugin\/<\/p>\n","protected":false},"template":"","class_list":["post-3716066","topic","type-topic","status-closed","hentry","topic-tag-yarpp"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3716066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3716066\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3716066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}