Forums › Forums › Search & Filter Pro › Datefilter
Tagged: current date, custom date, events, V3
- This topic has 31 replies, 2 voices, and was last updated 4 years, 8 months ago by Trevor.
-
Trevor(Private) April 1, 2020 at 2:34 pm #238596
We can, together, explore going down that route. The first thing I think you CAN do, is to create the ACF field. I would suggest making a dropdown field, where you specify the choices. Open ONE post and manually set the value (correctly), and then we can add that to the form.
Then we can see if we can code it together.
BTW, are you using a child theme?
Trevor(Private) April 1, 2020 at 3:17 pm #238609I found a post that will help us:
The code used there was this:
// save Author to author function event_author_on_save( $post_id ) { $post_type = 'event'; //custom post type - change to post if you're just working with posts //Check if we are saving correct post type if( get_post_type( $post_id ) != $post_type) return; //Check it's not an auto save routine if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return; // get the author ID of the post $author_id = get_post_field ('post_author', $post_id); // get the display name of that author $author = get_the_author_meta( 'display_name' , $author_id ); // update the custom field value update_field( 'acf_event_author', $author, $post_id ); } add_action('save_post', 'event_author_on_save');
-
AuthorPosts