Json categories feed

Home Forums Calendar Products Events Calendar PRO Json categories feed

  • This topic has 11 replies, 2 voices, and was last updated 5 years, 9 months ago by João Dessain Saraiva.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1561146

    Hey,
    I need a feed that shows the loaded events categories, shortcode and number of events.
    What’s the best way to achieve this ?

    Thanks,

    #1561179
    Cliff
    Member

    Hi, 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.

    #1561372

    Hey, yes I need the rest API in order to get all the categories.

    #1562265
    Cliff
    Member

    Thanks 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.

    #1570448

    This reply is private.

    #1571117
    Cliff
    Member

    One 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.

    #1571326

    This reply is private.

    #1572058
    Cliff
    Member

    This reply is private.

    #1572075

    This reply is private.

    #1572110
    Cliff
    Member

    Here 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
    #1572352

    This reply is private.

    #1574147
    Cliff
    Member

    You 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.

    #1589726
    Support Droid
    Keymaster

    Hey 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

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Json categories feed’ is closed to new replies.