{"id":5172039,"date":"2014-08-08T10:54:30","date_gmt":"2014-08-08T10:54:30","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/filter-by-custom-taxonomy-2\/"},"modified":"2016-08-22T00:03:15","modified_gmt":"2016-08-22T00:03:15","slug":"filter-by-custom-taxonomy-2","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/filter-by-custom-taxonomy-2\/","title":{"rendered":"Filter by custom Taxonomy"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I read several pages of the official documentation, but<\/p>\n<p><code>echo EM_Events::output( array(&#039;my-tax&#039;=&gt;&#039;my-term&#039; ) )<\/code><\/p>\n<p>simply doesn&#8217;t work, it completely ignores the taxonomy and term. I checked the SQL that is put together in em-events.php to verify. <\/p>\n<p>How can I filter a list of events for a custom taxonomy term? The taxonomy is registered like so:<\/p>\n<pre><code>if( defined( &#039;EM_POST_TYPE_EVENT&#039; ) ) :\n                register_taxonomy( &#039;event-category&#039;, array(\n                    EM_POST_TYPE_EVENT\n                        ), array(\n                    &#039;hierarchical&#039; =&gt; TRUE,\n                    &#039;labels&#039; =&gt; $labels,\n                    &#039;label&#039; =&gt; __( &#039;Veranstaltungs-Kategorie&#039;, self::$textdomain ),\n                    &#039;show_ui&#039; =&gt; TRUE,\n                    &#039;query_var&#039; =&gt; &#039;event-category&#039;,\n                    &#039;show_in_nav_menus&#039; =&gt; TRUE,\n                    &#039;rewrite&#039; =&gt; array( &#039;slug&#039; =&gt; &#039;event-category&#039; )\n                ) );<\/code><\/pre>\n<p>Thanks, Paddelboot<\/p>\n<p>https:\/\/wordpress.org\/plugins\/events-manager\/<\/p>\n","protected":false},"template":"","class_list":["post-5172039","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5172039","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\/5172039\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5172039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}