Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7049

    permanyer
    Participant

    I needed to know if the event had recurrence. I ignore if there is a function for that, but i did not find it. I implemented it this way:

    
    function em_get_recurrence($post_id){
    	global $wpdb;
    	$matches = $wpdb->get_var("SELECT count(*) from wp_postmeta WHERE post_id=".$post_id." AND meta_key='_event_occurrence_date'");
    	$recurrence = intval($matches) - 1;	
    	return $recurrence;
    }
    

    It returns the times the event is repeated (if it returns 0, the the event happens only once)

    #9823

    idleberg
    Participant

    I was excited to run across this, but unfortunately it always returns -1 for me. I was hoping to find a way that allows me to filter recurring events from my query.

    Update: I found out I can simply use the event_show_occurrences for my problem

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.