Home › Forums › Calendar Products › Events Calendar PRO › Json categories feed
- This topic has 11 replies, 2 voices, and was last updated 7 years, 8 months ago by
João Dessain Saraiva.
-
AuthorPosts
-
June 25, 2018 at 3:17 pm #1561146
João Dessain Saraiva
ParticipantHey,
I need a feed that shows the loaded events categories, shortcode and number of events.
What’s the best way to achieve this ?Thanks,
June 25, 2018 at 3:54 pm #1561179Cliff
MemberHi, João. I’m unsure how you’re wanting to get this? Are you wanting to get upcoming events within a certain Event Category (which is possible via our REST API)? Or are you wanting to display something custom via shortcode? I’m a bit confused since you mentioned JSON, categories, and shortcode.
June 26, 2018 at 12:43 am #1561372João Dessain Saraiva
ParticipantHey, yes I need the rest API in order to get all the categories.
June 26, 2018 at 2:40 pm #1562265Cliff
MemberThanks for confirming.
Please reference https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/#a-living-swagger-io-documentation and let me know if you have any follow-up questions on this topic.
July 9, 2018 at 1:07 am #1570448João Dessain Saraiva
ParticipantThis reply is private.
July 9, 2018 at 3:26 pm #1571117Cliff
MemberOne of these filters may be useful to accomplish your customization:
- tribe_rest_events_archive_data
- tribe_rest_event_data
Please let me know how this goes for you.
July 10, 2018 at 1:51 am #1571326João Dessain Saraiva
ParticipantThis reply is private.
July 10, 2018 at 1:43 pm #1572058Cliff
MemberThis reply is private.
July 10, 2018 at 2:09 pm #1572075João Dessain Saraiva
ParticipantThis reply is private.
July 10, 2018 at 2:42 pm #1572110Cliff
MemberHere are some filters that might apply to what you’re doing:
- tribe_rest_event_categories_data per-event or tribe_rest_taxonomy_term_data per-term, both within /wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Post_Repository.php
- tribe_rest_event_category_max_per_page , within /wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Endpoints/Term_Archive_Base.php
July 11, 2018 at 1:54 am #1572352João Dessain Saraiva
ParticipantThis reply is private.
July 12, 2018 at 2:30 pm #1574147Cliff
MemberYou might want to use a filter provided by WordPress itself, such as this:
add_filter( 'rest_request_after_callbacks', function( $data ) { # Actual categories can be found in $data->data['categories'] return $data; } );Please let me know if this helps.
August 3, 2018 at 9:35 am #1589726Support 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 ‘Json categories feed’ is closed to new replies.
