• Hi, I try to create a event from the API using Postman.
    How i can set meta fields?

    I used the register_meta() function

    $object_type = 'post';
    $args1 = array( 
    	'type'         => 'string',
    	'description'  => 'A meta key associated with a string meta value.',
    	'single'       => true,
    	'show_in_rest' => true,
    );
    register_meta( $object_type, 'mec_cost', $args1 );

    But get an error

    Fatal error: Call to undefined function register_meta() in C:\OpenServer\domains\wp.dev\web\wp-includes\functions.php on line 5721

    PS. here’s my plugin https://codecanyon.net/item/modern-events-calendar-responsive-event-scheduler-booking-for-wordpress/17731780

    • This topic was modified 8 years, 1 month ago by eynsteyn.
  • The topic ‘Creating Modern Events Calenar post_types’ is closed to new replies.