multiple calendars

Home Forums Calendar Products Events Calendar PRO multiple calendars

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #948906
    Justin
    Participant

    We have need of a separate calendar on the same site. One calendar for main college events and one for activities at our raptor center. Do we need to buy an extra calendar? Is there a way to separate calendars? Thanks.

    #948937
    Barry
    Member

    Hi Davin,

    The easiest way to tackle this would simply be to use categories: you could have a “Site A” category and a “Site B” category (of course, you would probably use more meaningful names 😉 ).

    Beyond that you can certainly use the calendar on a multisite network – but we would ask that you respect the spirit of the license and purchase the appropriate level if you do this, just as you would if you ran the plugin on two completely separate WordPress installations.

    Does that clarify things at all?

    #949482
    Justin
    Participant

    Exclude One Category from Events Listing. So for example.

    add_action( 'pre_get_posts', 'exclude_events_category' );
     
    function exclude_events_category( $query ) {
    
    if( tribe_is_month() && !is_tax() ) { // Month View Page
    
    	  $query->set( 'tax_query', array(
     
        array(
     
          'taxonomy' => TribeEvents::TAXONOMY,
     
          'field' => 'slug',
     
          'terms' => array('src-events'),
     
          'operator' => 'NOT IN'
     
        )
     
        )
     
      );
    }
    return $query;
     
    }

    The events from my category are still showing on my home page.

    <a href="<?php echo the_permalink(); ?>"> <h4 class="cal-icon"><?php echo tribe_get_start_date($post->ID, true, 'F j, Y'); ?></h4></a>
                            <p><?php  echo tribe_get_start_time(); ?> - <?php  echo tribe_get_end_time(); ?></p>   
    			<a href="<?php echo the_permalink(); ?>"> <h4 class="event-icon"><?php the_title(); ?></h4></a>                            
                        	<a href="<?php echo the_permalink(); ?>"> <h4 class="loc-icon"><?php echo tribe_get_venue( '$venue_ID' ); ?></h4></a>

    Then when I get to day view and click another event it jumps from

    http://wptest.vetmed.auburn.edu/events/category/src-events/

    to

    http://wptest.vetmed.auburn.edu/event/society-of-physics-students/

    It loses the category please assist.

    Thanks

    #949560
    Barry
    Member

    Hi Davin,

    Unfortunately those URLs do not resolve/time out when I try to access them.

    The events from my category are still showing on my home page.

    So do you mean your main events page, rather than the blog homepage? It could be worth switching to the tribe_events_pre_get_posts action here.

    Then when I get to day view and click another event it jumps from

    http://wptest.vetmed.auburn.edu/events/category/src-events/

    to

    http://wptest.vetmed.auburn.edu/event/society-of-physics-students/

    I’m not sure I fully understand the problem, here. Is that final URL not the address of the event you are clicking on?

    #949684
    Justin
    Participant

    Sorry about the link error

    http://www.vetmed.auburn.edu/event/src-test-event/

    http://www.vetmed.auburn.edu/events/category/src-events/

    What I am saying is I am trying to isolate a calendar so it does not show on the main calendar but a category.

    I used the following code I found in your knowledge base.

    /**
     * Exclude Categories from Month View of the Events Calendar
     */
    add_action( 'pre_get_posts', 'exclude_events_category' );
     
    function exclude_events_category( $query ) {
    
    if( tribe_is_month() && !is_tax() ) { // Month View Page
    
    	  $query->set( 'tax_query', array(
     
        array(
     
          'taxonomy' => TribeEvents::TAXONOMY,
     
          'field' => 'slug',
     
          'terms' => array('src-events'),
     
          'operator' => 'NOT IN'
     
        )
     
        )
     
      );
      
      }
    
    return $query;
     
    }

    Unfortunately its still showing up on the following page

    http://www.vetmed.auburn.edu/ (please scroll down to see events and activities)

    How can I properly isolate a calendar category

    #949690
    Barry
    Member

    Ah, I see.

    So the snippet actually does its job as expected, best I can tell – which is to remove a particular category of events from the general month view.

    If I’m understanding you correctly you want this also to impact the “events and activities” section of your site’s homepage – but this is not month view (and actually it does not even look like one of our own widgets).

    Is this section of your homepage something you custom built, or something that shipped with your theme perhaps?

    #949705
    Justin
    Participant

    Before we look into my homepage issue I need assistance to properly isolate a calendar category.

    As you can see from my posted code snippet and from your observation I was able to isolate the month view.

    Unfortunately, it is still showing in list view on the main calendar and not showing at all on the following page

    http://www.vetmed.auburn.edu/events/category/src-events/

    Please answer the following.

    1. How can I remove my category form the list view of the main calendar?
    2. How can I get my category to show in a month and list view on http://www.vetmed.auburn.edu/events/category/src-events/

    Thanks

    #949710
    Barry
    Member

    Hi Davin,

    Before we go much further I feel I should highlight that – while we’re always happy to help – the amount of support we can offer for customizations like this is comparatively limited.

    Ultimately while we can provide a starting point and aim to point you in the right direction, changes like this need to be driven forward by you (and it’s important you understand how these things work so you can maintain them in the future should something else change that has an impact on your solution).

    How can I remove my category form the list view of the main calendar?

    Right now the snippet only “kicks in” if month view is being viewed and a specific category (or tag) has not been requested:

    if ( tribe_is_month() && ! is_tax() )

    You might wish to add further checks for list view using tribe_is_list_view() if you want to extend this to cover list view, too.

    Would that work for you here?

    #949740
    Justin
    Participant

    Thanks for your help with that function call. It works like it should now.

    #949743
    Barry
    Member

    Fantastic!

    In that case I’ll close this topic, but if you need assistance with anything else (I realise you may still have some related concerns, but we do try hard to stick to one issue per topic) please don’t hesitate to post a fresh support topic and one of the team will be only too happy to help 🙂

    Thanks again.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘multiple calendars’ is closed to new replies.