• Hi! The post preview is showing blank after sharing the preview then editing the page then sharing the preview again.

    We’re using ACF to show content.

    Here’s how I’m getting to this issue:

    When on a page, I click the “Enable public preview” and then click “Save Draft” then I visit the URL within the “Enable public preview” field.

    This works fine and looks good.

    Then, I go back to the page editing screen and edit the content of the page, then click on “Save draft”, then visit the URL within “Enable public preview” field. This shows a page without any content.

    It shows the header and footer of the website, but nothing within the content area.

    If I don’t use ACF and just use the normal text editor, then it works fine. So I suspect some meta fields are getting lost along the way.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Maybe I have a same issue too … someone help me please.

    I’m having the same issue with updates to the ACF fields.

    michaelimi

    (@michaelimi)

    Hey, I am a little late to this but I came across a fix for this provided by Beaver Builder. This worked for me and I was having the same issue where the header and footer would only show but no post content. I do use Beaver Builder and this worked.

    Beaver Builder asked Public Post Plugin to deploy the fix here: https://github.com/ocean90/public-post-preview/issues/172

    Here is the fix below. Place it in the child theme’s functions.php file.

    add_filter( ‘fl_render_content_by_id_can_view’, function( $can_view, $post_id ) { if ( class_exists( ‘DS_Public_Post_Preview’ ) ) { $post_ids = get_option( ‘public_post_preview’, array() ); $post_ids = array_map( ‘intval’, $post_ids ); $can_view = ( in_array( $post_id, $post_ids ) ) ? true : $can_view; } return $can_view; }, 10, 2 );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Preview is blank after editing and saving the page with ACF content’ is closed to new replies.