• Resolved davidjs

    (@davidjs)


    I would like to output a list of all event categories with link to subscribe your personal calendar to the category.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter davidjs

    (@davidjs)

    Im trying to figure out how to first grab an array of categories and then grab the subscribe code which is usual on a individual category page

    <?php
       $args = array(
                   'taxonomy' => 'tribe_events_cat',
                   'orderby' => 'name',
                   'order'   => 'ASC'
               );
    
       $cats = get_categories($args);
    
       foreach($cats as $cat) {
    ?>
          <a href="<?php echo get_category_link( $cat->term_id ) ?>">
               <?php echo $cat->name; ?>
          </a><?php foreach ( $items as $item ) : ?>
    					<?php $this->template( 'components/subscribe-links/item', [ 'item' => $item ] ); ?>
    				<?php endforeach; ?>
    <?php
       }
    ?>
    Thread Starter davidjs

    (@davidjs)

    To help find the relevant code – This is what creates the subscribe button so look around the subscribe-links pages for the code to use.
    the-events-calendar/src/views/v2/compenents/subscribe-links/list.php

    <?php foreach ( $items as $item ) : ?>
    					<?php $this->template( 'components/subscribe-links/item', [ 'item' => $item ] ); ?>
    				<?php endforeach; ?>

    https://stackoverflow.com/questions/39652122/how-to-list-all-category-from-custom-post-type
    Im following these suggestions to get an array of custom post type categories. In this case its ‘taxonomy’ => ‘tribe_events_cat’,

    I need to output a list and inside each

    • This reply was modified 3 years, 3 months ago by davidjs.
    Plugin Author Gustavo Bordoni

    (@bordoni)

    Hi @davidjs,

    This is not something that particular code supports in a super easy way, but I am logging a ticket to the Developer that created that piece of our product so that we can implement something that would make that easier.

    Currently the best way to add other lists is to create a completely custom code which you are in the correct path, but we are having a super high support surge now and we dont have the available people to help you with the customization much further.

    But if you keep me updated here on how far you got or where you are stuck I can give you pointers on the correct direction.

    So far it feels like what you got is in the correct direction.

    But you might need to overwrite the [your-theme]/tribe/events/v2/components/subscribe-links/item.php since there is a check inside that prevents anything that is not an instance of Link_Abstract to be rendered, which can make your code get a little to complicated.

    Best Regards,

    Thread Starter davidjs

    (@davidjs)

    I have no clue where to go with this. I was inspired by nascar which uses a 3rd party calendar service. They have a +calendar icon that opens a modal and lets people select categories of events to subscribe to. The events calendar can do this if we can output this list with the subscribe links.
    https://www.nascar.com/nascar-cup-series/2022/schedule/#

    Hers how it will look in the events calendar filter bar.
    2022-03-02_12-10-05

    Plugin Author Gustavo Bordoni

    (@bordoni)

    Ohh I see what you mean.

    Unfortunately this level of customization is out of the bounds what I can provide you.

    Like I mentioned above I can give you or a developer working with you pointers of where to look in our codebase to get started, but this is 100% a custom feature so we really dont have the time to craft it.

    best regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display a list of all categories with calendar subscribe links’ is closed to new replies.