Import .ics event UID to use on frontend

WordPress Event Management, Calendars & Registration Forums iCal Extension Import .ics event UID to use on frontend

This topic contains 2 replies, has 2 voices, and was last updated by  Ultimate Design 2 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41622

    Hi there,

    I am hoping you can explain to me if it is possible to display the UID of an event inmported from .ics file?
    The format of an event I am importing is as follows:
    <br>
    BEGIN:VEVENT<br>
    UID:12020017@210.5.50.11<br>
    DTSTAMP:20220829T115924Z<br>
    DESCRIPTION:\n\nTest test.\n\nOther information:\n<br>
    DTSTART;TZID=Pacific/Auckland:20220905T080000<br>
    DTEND;TZID=Pacific/Auckland:20220905T163000<br>
    LOCATION:Event Centre, Gate 4 123 Event Road, City, Region<br>
    SUMMARY:New Event - City<br>
    CATEGORIES:event_category<br>
    END:VEVENT

    I’m trying to display the number before the “@” on
    UID:12020017@210.5.50.11, so in this case “12020017”.

    Is there any way to do this?

    Kind regards,
    Jamie

    Ultimate Design
    #41701

    Hi Jane,

    Yes you can use the function:

    eo_get_event_uid(get_the_ID())
    

    This will return a UID even for events that weren’t imported. If you only want the UID for imported events you can do the following instead:

    $uid = get_post_meta( get_the_ID(), '_eventorganiser_uid', true );
    
    Stephen Harris
    #41937

    Sorry for the slow response.
    Just want to say a big “Thank you!” to you Stephen.
    That worked perfectly.

    Much appreciated.

    Ultimate Design
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.