{"id":5964384,"date":"2015-03-31T17:06:00","date_gmt":"2015-03-31T17:06:00","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/slider-code-suggestion\/"},"modified":"2016-08-24T14:15:42","modified_gmt":"2016-08-24T14:15:42","slug":"slider-code-suggestion","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/slider-code-suggestion\/","title":{"rendered":"Slider &#8211; Code Suggestion"},"content":{"rendered":"<p>Hi,<\/p>\n<p>First, thanks for a great plugin that I&#8217;ve used on many sites for several years.<\/p>\n<p>I&#8217;ve had an ongoing problem with the slider though. When you do a tax query, it defaults to only searching for posts, and so if there are custom posts with that taxonomy tag, they aren&#8217;t returned. This can be quickly fixed by editing the files shortcodes-ultimate\/inc\/core\/tools.php on line 718 or so to change:<\/p>\n<pre><code>\/\/ Source: taxonomy\n\t\telseif ( $args[&#039;source&#039;][&#039;type&#039;] === &#039;taxonomy&#039; ) {\n\t\t\t\/\/ Parse taxonomy name and terms ids\n\t\t\t$args[&#039;source&#039;][&#039;val&#039;] = explode( &#039;\/&#039;, $args[&#039;source&#039;][&#039;val&#039;] );\n\t\t\t\/\/ Taxonomy parsed incorrectly, return empty array\n\t\t\tif ( !is_array( $args[&#039;source&#039;][&#039;val&#039;] ) || count( $args[&#039;source&#039;][&#039;val&#039;] ) !== 2 ) return $slides;\n\t\t\t$query[&#039;tax_query&#039;] = array(\n\t\t\t\tarray(\n\t\t\t\t\t&#039;taxonomy&#039; =&gt; $args[&#039;source&#039;][&#039;val&#039;][0],\n\t\t\t\t\t&#039;field&#039; =&gt; &#039;id&#039;,\n\t\t\t\t\t&#039;terms&#039; =&gt; (array) explode( &#039;,&#039;, $args[&#039;source&#039;][&#039;val&#039;][1] )\n\t\t\t\t)\n\t\t\t);\n\t\t}<\/code><\/pre>\n<p>to<\/p>\n<pre><code>\/\/ Source: taxonomy\n\t\telseif ( $args[&#039;source&#039;][&#039;type&#039;] === &#039;taxonomy&#039; ) {\n\t\t\t\/\/ Parse taxonomy name and terms ids\n\t\t\t$args[&#039;source&#039;][&#039;val&#039;] = explode( &#039;\/&#039;, $args[&#039;source&#039;][&#039;val&#039;] );\n\t\t\t\/\/ Taxonomy parsed incorrectly, return empty array\n\t\t\tif ( !is_array( $args[&#039;source&#039;][&#039;val&#039;] ) || count( $args[&#039;source&#039;][&#039;val&#039;] ) !== 2 ) return $slides;\n\t\t\t$query[&#039;tax_query&#039;] = array(\n\t\t\t\tarray(\n\t\t\t\t\t&#039;taxonomy&#039; =&gt; $args[&#039;source&#039;][&#039;val&#039;][0],\n\t\t\t\t\t&#039;field&#039; =&gt; &#039;id&#039;,\n\t\t\t\t\t&#039;terms&#039; =&gt; (array) explode( &#039;,&#039;, $args[&#039;source&#039;][&#039;val&#039;][1] )\n\t\t\t\t)\n\t\t\t);\n\t\t\t$query[&#039;post_type&#039;] = &#039;any&#039;;\n\t\t}<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/shortcodes-ultimate\/<\/p>\n","protected":false},"template":"","class_list":["post-5964384","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5964384","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\/5964384\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5964384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}