ical feed for app

Home Forums Calendar Products Events Calendar PRO ical feed for app

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #1174483
    Bryan Finley
    Participant

    we are going to be taking our app live soon. there is a spot in the app to include our ical feed from this calendar to load events into our app without adding them manually. however, we do not want everything on our events calendar to show on our app. is there a way to make certain events on the calendar “invisible” in the ical feed? the goal is to have the website show all events while the app just show specific ones. thanks!

    #1175143
    Nico
    Member

    Hey April,

    Thanks for reaching out to us!

    Sure it’s possible, just let me know how you plan to exclude those events. Maybe by using an Event Category or a Tag?

    Please let me know about it and I’ll create a snippet for this,
    Thanks so much,
    Nico

    #1181998
    Bryan Finley
    Participant

    That sounds great. Which do you think would be better? If both are the same, then i would say maybe a tag. Thank you for doing that!

    #1182460
    Nico
    Member

    Thanks for confirming April!

    In my opinion it might be better to use tags to exclude events. Just paste the snippet below in your theme’s (or child theme’s) functions.php file and it should do the trick:

    /* Tribe, exclude tag from ical feed */
    function tribe_filter_ical_feed ( $query ) {

    if ( !isset( $_GET['ical'] ) ) {
    remove_action ( 'pre_get_posts', 'tribe_filter_ical_feed' );
    return;
    }

    // use your tag_id/s
    $query->set('tag__not_in', array(99) );

    }

    add_action ( 'pre_get_posts', 'tribe_filter_ical_feed' );

    Please let me know if this works for you,
    Best,
    Nico

    #1183229
    Bryan Finley
    Participant

    i am not sure how to do what you just told me. can you walk me thru that? or is that something i need to get a tech person to do?

    #1183911
    Nico
    Member

    Thanks for following April!

    Yeah I guess some basic programming knowledge is needed for this. You can check this blogpost by George → Adding Code to Your Site When You’re Not a “Coder”. Anyway if you are not sure about it, I recommend touching base with a developer that can do this for you.

    Best,
    Nico

    #1186482
    Bryan Finley
    Participant

    Ok i had our web person add it to the functions file. how do i utilize the tag field now? i know how to add a tag, but what do i use as the actual tag to make sure it will be excluded from ical feed? thanks!

    #1187926
    Nico
    Member

    Thanks for following up April!

    Please note this line in the script:

    $query->set('tag__not_in', array(99) );

    In this case (just a sample) it’s excluding events with tag ID ’99’. Create a new tag in your site for this exclusion and replce ’99’ for the actual tag ID. Once that’s done just add the tag to the events you want to exclude and give this a try!

    Please let me know if it works as expected,
    Best,
    Nico

    #1188799
    Bryan Finley
    Participant

    can you tell me how to find the ical feed for my calendar so i can add it to the app settings? thanks!

    #1188905
    Nico
    Member

    Sure April, you can access the feed by adding ?ical=1 to any calendar views. For example: http://sitename/events/?ical=1.

    Please let me know if that works for you,
    Best,
    Nico

    #1189034
    Bryan Finley
    Participant

    thank you nico! i added the URL to the app and the events did pull into the app. however, i added the tag 99 and those events are not excluded. when i click on the event, it does show tag 99 on it.

    #1189265
    Nico
    Member

    Thanks for following up April!

    I think the issue here is that you need to create a new tag (for example called ‘exclusive’) and input that tag’s ID in replacement of the ’99’ sample tag ID. If you are not sure how to get the tag id, just go to the Tags list (WP-Admin > Post > Tags) once there click to edit the desired tag and when the edit page is loaded you’ll see the ‘tag_ID’ parameter in the URL → that’s the value we are looking for!

    Please let me know if you can configure this now 🙂

    Best,
    Nico

    #1195281
    Bryan Finley
    Participant

    hi nico! ok i found my functions.php file and updated the 99 with 134 because that is the tag_id in the URL for the “no” tag i created to mean exclude from the ical feed for the app. however it is still showing in the app.

    http://www.hopenc.org/wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=134&post_type=post&wp_http_referer=%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dpost_tag%26paged%3D4

    also, i am putting the events into the calendar for EST time zone and have my settings set to EST, and my app is set to EST but the ical feed is sending them over in PDT. is there another setting adjustment i need to make that i am unaware of? thanks!

    #1195793
    Nico
    Member

    Thanks for following up April and sorry to hear this is still not working for you 🙁

    Regarding the link you sent, it’s an admin view link so I’m not able to check it out. Can you please send me a link to an event that should be excluded from the feed?

    also, i am putting the events into the calendar for EST time zone and have my settings set to EST, and my app is set to EST but the ical feed is sending them over in PDT. is there another setting adjustment i need to make that i am unaware of?

    Can you please let me know which is the timezone set for WordPress (WP-Admin > Settings > General > Timezone) and the site timezone mode (WP-Admin > Events > Settings > General > Timezone mode)? I’ll take a look into that…

    Best,
    Nico

    #1196079
    Bryan Finley
    Participant

    wordpress time zone was at utc 0 but a few days ago i found that setting and changed it to utc-5 which is est.

    the other one says use local timezones for each event

Viewing 15 posts - 1 through 15 (of 29 total)
  • The topic ‘ical feed for app’ is closed to new replies.