how to make same organizer for each event?
-
The organizer autocomplete is not working in my plugin. and even I don’t need that field to show in event create form, which I successfully removed.
What I want is when someone creates an event its organizer name should be “Community Events”, I have already created a community events organizer. As organizer field is not available in frontend when an event creates no organizer assigned to an event.
/** * Do something when a new book is created */ function new_book($post_id, $post, $update) { if ($post->post_type == 'event_listing' && $post->post_status == 'publish' && empty(get_post_meta( $post_id, '_event_organizer_ids' ))) { # New Post # Do something here... # And update the meta so it won't run again update_post_meta( $post_id, '_event_organizer_ids', 2010); } } add_action( 'wp_insert_post', 'new_book', 10, 3 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to make same organizer for each event?’ is closed to new replies.