I also had to go back to 5.6.10, many users (mainly on Windows) were not able to update or save posts (javascript problem I assume).
Any updates on this issue? Thanks,
I’m facing the same problem, backend update post is broken for some browsers because of this.
(I find really weird that it is browser dependent)
Any updates?
Hi,
Actually, if you want to use get_field()
method outside a WP loop, then you have to specify the $post_id as a second argument in the method get_field( $fieldname, $post_id)
.
Hi,
I’m not sure if there is a better way to handle this but I would personally suggest to create a function fired on save post, and if the “end date” is empty, you can set the default date (5 days after the start date):
function custom_execute_save_post_actions($post_id, $post, $update){
// Stop WP from clearing custom fields on autosave
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
return;
if ( 'trash' != $post_status ) {
// check if your custom field is empty and set the default value here
}
}
add_action( 'save_post', 'custom_execute_save_post_actions', 10, 3);
Hi,
You have to restore the main query with wp_reset_query() instead of wp_reset_postdata().
Give that a try!
Are you referring to a custom post type?
If yes, ACF is not what you are looking for. Take a look at:
https://wordpress.org/plugins/custom-post-type-ui/
Or if you want to code it directly in your theme (functions.php):
https://codex.wordpress.org/Post_Types