Support

Account

Home Forums General Issues Preview Solution! 10 years later

Solving

Preview Solution! 10 years later

  • TL;DR Syntaxe update on the still working solution.

    10 years later I still have the same problem with the preview (not related to ACF here but to with the WP featured image).

    I gave a solution in this forum thread Preview solution !

    I cannot post a reply in the original thread because it’s closed but I wanted to keep a track of the updated code solution for me (or anyone) in the future that will loose their mind debugging the WP preview.

    You can se the problem in this old image
    Preview issue

    The code in the previous thread is still working but needs a little update on the syntaxe.

    So here is the solution updated (put this code on your function.php file):

    `
    /*
    Debug preview with custom fields
    */

    add_filter(‘_wp_post_revision_fields’, function($fields){
    $fields[“debug_preview”] = “debug_preview”;
    return $fields;
    });

    add_action(‘edit_form_after_title’, function () {
    echo ‘<input type=”hidden” name=”debug_preview” value=”debug_preview”>’;
    });
    `

  • Hi. I made a lengthier post in the Bug forum right now.
    Not giving a solution – but with more details about the problem.

    You can “upvote” it by commenting on it – since I hope they can address this issue in the very near future.

    But in your case – is the acf field and WP meta being treated the same.
    If the error is in ACF, then I am more positive to the ACF-team patching it.. if it is WP team.. then I will abandon wp and acf for other alternatives (okey, I wont.. but leaning towards it at least…)

  • And no – your solution do not work.
    Tried to add your code to my test cases, but unfortunately not.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.