{"id":1193007,"date":"2016-11-16T00:09:11","date_gmt":"2016-11-16T08:09:11","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/"},"modified":"2016-11-16T00:09:11","modified_gmt":"2016-11-16T08:09:11","slug":"customizing-the-tribe-events-bar","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/","title":{"rendered":"Customizing the Tribe Events Bar"},"content":{"rendered":"<p>I have added an additional filter to the bar, with a dropdown of the event categories using this code:<\/p>\n<p><code>add_filter( 'tribe-events-bar-filters',  'setup_my_field_in_bar', 1, 1 );<\/p>\n<p>function setup_my_field_in_bar( $filters ) {<br \/>\n    $filters['tribe-bar-department-filter'] = array(<br \/>\n        'name' =&gt; 'tribe-bar-department',<br \/>\n        'caption' =&gt; 'Department',<br \/>\n        'html' =&gt; '&lt;select onchange=\"if (this.value) window.location.href=this.value\"&gt;<br \/>\n&lt;option value=\"\/auctions\/\"&gt;DEPARTMENT&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/twentieth-century-design\/\"&gt; 20th Century Design&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/modern-post-war-art\/\"&gt; Modern &amp; Post-War Art&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/chinese-japanese-islamic-art\/\"&gt; Chinese, Japanese &amp; Islamic Art&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/jewellery-watches\/\"&gt; Jewellery &amp; Watches&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/rugs-tribal-art\"&gt; Rugs &amp; Tribal Art&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/furnature-garden-house-sales\"&gt; Furniture, Garden &amp; House Sales&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/traditional-paintings-watercolours-prints\"&gt; Traditional Paintings, Watercolours &amp; Prints<\/a>&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/clocks-barometers\"&gt; Clocks &amp; Barometers&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/silver\"&gt; Silver&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/british-european-ceramics-glass\"&gt; British &amp; European Ceramics &amp; Glass&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/books-manuscripts\"&gt; Books &amp; Manuscripts&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/medals-militaria-vintage-toys\"&gt; Medals, Militaria &amp; Vintage Toy&lt;\/option&gt; &lt;\/select&gt;'<br \/>\n    );<\/p>\n<p>    return $filters;<br \/>\n}<\/code><\/p>\n<p>Now i want to add another dropdown of some other event categories in place of the Near section.<\/p>\n<p>I have tried this code:<\/p>\n<p><code>add_filter( 'tribe-events-bar-filters',  'setup_my_location_in_bar', 1, 1 );<\/p>\n<p>function setup_my_location_in_bar( $filters ) {<br \/>\n    $filters['tribe-bar-department-filter'] = array(<br \/>\n        'name' =&gt; 'tribe-bar-location',<br \/>\n        'caption' =&gt; 'Location',<br \/>\n        'html' =&gt; '&lt;select onchange=\"if (this.value) window.location.href=this.value\"&gt;<br \/>\n&lt;option value=\"\/auctions\/\"&gt;Location&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/oxford\/\"&gt; Oxford&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/cheltenham\/\"&gt; Cheltenham&lt;\/option&gt;<br \/>\n&lt;option value=\"\/auctions\/category\/abingdon\/\"&gt; Abingdon&lt;\/option&gt; &lt;\/select&gt;'<br \/>\n    );<\/p>\n<p>    return $filters;<br \/>\n}<\/code><\/p>\n<p>But this causes errors, any ideas??<\/p>\n<p>thanks<\/p>\n","protected":false},"template":"","class_list":["post-1193007","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>Customizing the Tribe Events Bar -<\/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\/customizing-the-tribe-events-bar\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customizing the Tribe Events Bar -\" \/>\n<meta property=\"og:description\" content=\"I have added an additional filter to the bar, with a dropdown of the event categories using this code: add_filter( &#039;tribe-events-bar-filters&#039;, &#039;setup_my_field_in_bar&#039;, 1, 1 ); function setup_my_field_in_bar( $filters ) { $filters[&#039;tribe-bar-department-filter&#039;] = array( &#039;name&#039; =&gt; &#039;tribe-bar-department&#039;, &#039;caption&#039; =&gt; &#039;Department&#039;, &#039;html&#039; =&gt; &#039;&lt;select onchange=&quot;if (this.value) window.location.href=this.value&quot;&gt; &lt;option value=&quot;\/auctions\/&quot;&gt;DEPARTMENT&lt;\/option&gt; &lt;option value=&quot;\/auctions\/category\/twentieth-century-design\/&quot;&gt; 20th Century Design&lt;\/option&gt; &lt;option value=&quot;\/auctions\/category\/modern-post-war-art\/&quot;&gt; Modern [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/\",\"name\":\"Customizing the Tribe Events Bar -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-11-16T08:09:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/#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\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Customizing the Tribe Events Bar\"}]},{\"@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":"Customizing the Tribe Events Bar -","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\/customizing-the-tribe-events-bar\/","og_locale":"en_US","og_type":"article","og_title":"Customizing the Tribe Events Bar -","og_description":"I have added an additional filter to the bar, with a dropdown of the event categories using this code: add_filter( 'tribe-events-bar-filters', 'setup_my_field_in_bar', 1, 1 ); function setup_my_field_in_bar( $filters ) { $filters['tribe-bar-department-filter'] = array( 'name' =&gt; 'tribe-bar-department', 'caption' =&gt; 'Department', 'html' =&gt; '&lt;select onchange=\"if (this.value) window.location.href=this.value\"&gt; &lt;option value=\"\/auctions\/\"&gt;DEPARTMENT&lt;\/option&gt; &lt;option value=\"\/auctions\/category\/twentieth-century-design\/\"&gt; 20th Century Design&lt;\/option&gt; &lt;option value=\"\/auctions\/category\/modern-post-war-art\/\"&gt; Modern [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/","name":"Customizing the Tribe Events Bar -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-11-16T08:09:11+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customizing-the-tribe-events-bar\/#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":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Customizing the Tribe Events Bar"}]},{"@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\/1193007","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\/1193007\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1193007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}