Skip to content

Post title reverts to _post_title  #164

@JustinSainton

Description

@JustinSainton

Steps to Reproduce

  1. Go to any existing page's edit screen.
  2. Change the title and update the page.
  3. Tailor the page - make any change and save it.
  4. Go back to edit screen, see title is reverted to previous title.

This is due to this function:

public function update_post_title( $post_id ) {
$saved_title = get_post_meta( $post_id, '_post_title', true );
if ( false != $saved_title ) {
wp_update_post( array(
'ID' => $post_id,
'post_title' => $saved_title
) );
}
}

I'm unclear at the moment on what the best way to address this. Current working theory is that it probably makes sense to hook into post title changes and update the _post_title meta key so they stay synced in both directions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions