Skip to content

Instantly share code, notes, and snippets.

Forked from ChrisLTD/functions.php
Created January 24, 2023 10:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Fix so you can preview ACF field changes in Wordpress admin
Debug preview with custom fields
Taken from:
See also:
add_filter('_wp_post_revision_fields', 'add_field_debug_preview');
function add_field_debug_preview($fields){
$fields["debug_preview"] = "debug_preview";
return $fields;
add_action( 'edit_form_after_title', 'add_input_debug_preview' );
function add_input_debug_preview() {
echo '<input type="hidden" name="debug_preview" value="debug_preview">';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment