Adding custom fields to ICAL content

Home Forums Calendar Products Events Calendar PRO Adding custom fields to ICAL content

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1586474
    Eyal
    Participant

    Hi,
    I need to add custom fields to ICAL content for further export to Google Calendar including these fields.
    I created the following function and filter:

    function wpa_content_filter( $content ) {
    global  $post;
    $post_id = $post->ID;	
    	$meta_by = get_post_meta( $post_id, 'by_lector', true);
    	$meta_place = get_post_meta( $post_id, 'location', true);
    	$meta_from = get_post_meta( $post_id, 'from', true);
        if( $meta_by || $meta_place || $meta_from ) {
    		$meta_by_html = '<div class="by"><label>By:</label>' .$meta_by. '</div>';
    		$meta_place_html = '<div class="location"><label>Where:</label>' .$meta_place. '</div>';
    		$meta_from_html = '<div class="from"><label>From:</label>' .$meta_from. '</div>';
            return $post_id. $meta_by_html .$meta_from_html . $meta_place_html . $content ;
    	
        }
        return $content;
    	wp_reset_postdata();
    	
    }
    add_filter( 'the_content', 'wpa_content_filter', 1);
    

    This works fine in any loop of the site, except ICAL. ICAL file displays the content and fields of the last event (BY id) for all events.

    Is there any solution for the case?
    I’m a PRO user, if that’s matter.
    Thank you.

    #1587245
    Eyal
    Participant

    Why there is no reply? Is it possible to get a reply for development related questions? It is not fare to ignore customer.

    #1587829
    Sky
    Keymaster

    Hi there,

    We try to answer posts within 24-48 hours. Usually it is much quicker, but we have a higher than normal number of support tickets at the moment.

    I’m afraid this appears to be beyond the scope of what type of support we are able to provide here in the forums.

    Please review our terms of support.

    Thanks,
    Sky

    #1604190
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding custom fields to ICAL content’ is closed to new replies.