Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi markpanado,

    Events are stored in the wp_posts table along with all other posts, so yes you can get them by ID if you know the ID… Let me know if you have any other questions.

    – Jonah

    Thread Starter markpanado

    (@markpanado)

    Hi Jonah,

    Thanks, It helps! ??

    The problem is, it doesn’t include other fields for Events such as:

    • Date
    • Category
    • Phone
    • Email
    • Venue
    • Address
    • Cost

    Here is my code. It will only output the standard fields:

    # consider that $id is not an array
    function mj_ajax_get_class($id){
    	$args = array(
    		'post_type'	=> 'tribe_events',
    		'include'	=> array($id),
    	 );
    
    	return get_posts($args);
    }

    What should I add to fetch the other fields specific to Events?

    – Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get Specific Events by IDs’ is closed to new replies.