{"id":133634,"date":"2014-04-15T17:47:43","date_gmt":"2014-04-16T00:47:43","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/filter-for-additional-field\/"},"modified":"2014-04-22T06:55:57","modified_gmt":"2014-04-22T13:55:57","slug":"filter-for-additional-field","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/","title":{"rendered":"Filter for Additional Field"},"content":{"rendered":"<p>This question has been asked a few times, but I haven&#8217;t found a solution in the forum, in a tutorial, or through my own efforts.<\/p>\n<p>I am trying to create a filter on the filter bar for an additional field. I have tried the tutorial here: https:\/\/theeventscalendar.com\/understanding-the-tribeeventsbar\/ as well as read multiple questions on your support forums and documents. I am trying to create a set of tags to add to events that doesn&#8217;t include the WordPress default &#8216;tags&#8217;.<\/p>\n<p>I created a new filter page based on TribeEventsFilter_Category.php called TribeEventsFilter_CustomTag.php. I added a line to tribe-filter-view.class.php to include this file (I will eventually add a filter instead of hard coding this):<br \/>\nnew TribeEventsFilter_CustomTag( __( &#8216;Custom Tags&#8217;, &#8216;tribe-events-filter-view&#8217; ), &#8216;customtags&#8217;);<\/p>\n<p>What I can&#8217;t figure out is how to query for a &#8216;term&#8217; for an additional field. In my case the additional field is called Custom Tags. The line in TribeEventsFilter_CustomTag.php that needs to be edited is:<\/p>\n<p>$custom_tags_term = get_terms( TribeEvents::TAXONOMY, array( &#8216;orderby&#8217; =&gt; &#8216;name&#8217;, &#8216;order&#8217; =&gt; &#8216;DESC&#8217; ) );<\/p>\n<p>I have tried:<br \/>\n$custom_tags_term = get_terms( &#8216;custom_tags&#8217;, array( &#8216;orderby&#8217; =&gt; &#8216;name&#8217;, &#8216;order&#8217; =&gt; &#8216;DESC&#8217; ) );<\/p>\n<p>I have also tried &#8216;customtags&#8217;, &#8216;custom_tag&#8217;, and &#8216;customtag&#8217; for the term query. I searched the database for any instance of the above strings and only found custom_tags in wp_term_taxonomy. None of these work, leaving the filter drop down empty. How should I edit this query to pull in the additional field values for the filterbar?<\/p>\n","protected":false},"template":"","class_list":["post-133634","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Filter for Additional Field -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Filter for Additional Field -\" \/>\n<meta property=\"og:description\" content=\"This question has been asked a few times, but I haven&#8217;t found a solution in the forum, in a tutorial, or through my own efforts. I am trying to create a filter on the filter bar for an additional field. I have tried the tutorial here: https:\/\/theeventscalendar.com\/understanding-the-tribeeventsbar\/ as well as read multiple questions on your [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-04-22T13:55:57+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/\",\"name\":\"Filter for Additional Field -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-04-16T00:47:43+00:00\",\"dateModified\":\"2014-04-22T13:55:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Filter Bar\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Filter for Additional Field\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Filter for Additional Field -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/","og_locale":"en_US","og_type":"article","og_title":"Filter for Additional Field -","og_description":"This question has been asked a few times, but I haven&#8217;t found a solution in the forum, in a tutorial, or through my own efforts. I am trying to create a filter on the filter bar for an additional field. I have tried the tutorial here: https:\/\/theeventscalendar.com\/understanding-the-tribeeventsbar\/ as well as read multiple questions on your [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/","article_modified_time":"2014-04-22T13:55:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/","name":"Filter for Additional Field -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-04-16T00:47:43+00:00","dateModified":"2014-04-22T13:55:57+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-for-additional-field\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Filter Bar","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/"},{"@type":"ListItem","position":5,"name":"Filter for Additional Field"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/133634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/133634\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=133634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}