Support

Account

Home Forums Gutenberg Deleted posts are still appearing in ACF Post Object field in ACF custom block

Unread

Deleted posts are still appearing in ACF Post Object field in ACF custom block

  • I am not sure if this is a WordPress issue or an ACF issue (or both, or neither), but I figured I’d start here. I built a custom ACF block to display my company’s team members (a custom post type called “team_member”). The block uses an ACF Post Object field that has the “Select Multiple” toggle enabled and also filters the selectable posts by the desired post type and “Published” post status (see screenshot).

    The issue that I’m seeing is that team members continue to be displayed in the block output when they no longer exist. A former team member, Caitlin, used to be among the selected people in this block and then once she left the company we deleted her from the website (i.e. we trashed her respective “team_member” post). She doesn’t appear in the ACF Post Object field in the right sidebar when editing the block in the post editor, but her old post_id still exists in the HTML comment markup that is in the post_content for the page that this block is inserted into (see screenshot).

    Why does the post_id for a deleted post not get removed from the ACF block when it is trashed?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.