Home › Forums › Calendar Products › Events Calendar PRO › Shortcode problem
- This topic has 13 replies, 3 voices, and was last updated 8 years, 6 months ago by
Ulf.
-
AuthorPosts
-
August 30, 2017 at 1:54 am #1342227
Ulf
ParticipantHi, im using a shortcode and my goal is to list all the events that have the tag “flexpaket”. But the following shortcode does not filter the tag “flexpaket”. It just show all of the events.
[tribe_events view=”list” tribe-bar=”false” tag=”flexpaket”]
August 30, 2017 at 6:54 am #1342322Courtney
MemberHi Ulf
Can you try using this shortcode instead?
[tribe_events_list tag="flexpaket"]
Let me know if that works for you.
Thanks
Courtney 🙂August 31, 2017 at 6:20 am #1343020Ulf
ParticipantWell… is sort of work. It views the right events, but not with the custom styling i want it to have.
The event list should look like this page
http://www.varakonserthus.se/pa-scen/August 31, 2017 at 6:48 am #1343039Courtney
MemberHi Ulf
Unfortunately our full width calendar view shortcodes do not yet have tags as a filter option.
If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.
You can suggest it it https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/18382048-add-tag-as-filter-option-for-tribe-events-shortcod.
Thanks
Courtney 🙂September 1, 2017 at 1:54 am #1343512Ulf
ParticipantWould it work if i change “flexpaket” from a “tag” to a “category” instead?
September 1, 2017 at 6:54 am #1343601Courtney
MemberHi Ulf
Yes, calendar view shortcodes can support categories. Please let me know if that works out.
Thanks
Courtney 🙂September 4, 2017 at 2:27 am #1344402Ulf
ParticipantWell… it works, but choosing this way will generate another problem. If i switch this tag to a category also means that it also will be shown in the filterbar. This is something i do not want.
Im using categories to define our available music-genres and thats is the only categories i want to be shown in the filterbar.
Is there a way to exclude some categories from the filterbar or a way to pick witch categories i want to be shown.
September 4, 2017 at 8:23 pm #1344687Victor
MemberHi Ulf!
You can hide specific categories from the Filter bar by using the snippet Nico shared in this thread > https://theeventscalendar.com/support/forums/topic/exclude-two-specific-categories-from-filter-bar-menu/#dl_post-1134692
I hope that helps 🙂
Is there anything else we can help you with? Let us know
Best,
VictorSeptember 5, 2017 at 2:58 am #1344761Ulf
ParticipantOk, i have tired it but it did not work for me. I try to exclude the category “dans”. Can you please check if my code is correct if i want to exclude the category “dans”
/* Tribe hide categories from filter */ function tribe_modify_category_filter ( $values, $slug ) { if ( $slug != 'eventcategory' ) return $values; foreach ( $values as $key => $value ) { if ( $value['name'] == ’dans’ || $value['name'] == 'Category Name 2' ) { unset( $values[$key] ); } } return $values; } add_filter( 'tribe_events_filter_values', 'tribe_modify_category_filter', 10, 2 );September 8, 2017 at 7:29 am #1346582Courtney
MemberHi Ulf
You won’t need
|| $value['name'] == 'Category Name 2'
in your code.
Can you try that?
Thanks
Courtney 🙂September 11, 2017 at 12:36 am #1347362Ulf
ParticipantOk, i have inserted the following code, but the category is still visible in the dropdown list
/* Tribe hide categories from filter */ function tribe_modify_category_filter ( $values, $slug ) { if ( $slug != 'eventcategory' ) return $values; foreach ( $values as $key => $value ) { if ( $value['name'] == ’dans’ ) { unset( $values[$key] ); } } return $values; } add_filter( 'tribe_events_filter_values', 'tribe_modify_category_filter', 10, 2 );September 11, 2017 at 9:36 am #1347561Courtney
MemberOctober 3, 2017 at 9:36 am #1358369Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Shortcode problem’ is closed to new replies.
