i added a new field (property_second) to the admin area of the theme. and i want this field value to be the same as the post title. so if the post title changes, let it change here. how can I do it?

            'key' => ERE_METABOX_PREFIX. 'property_second',
            'value' => $keyword,
            'type' => 'CHAR',
            'compare' => 'LIKE',
  • 1
    Are you asking how to store the post title in a meta field, or how to update that meta field if/when the post title changes?
    – Pat J
    Mar 8 '21 at 1:37

Hook into the post status transitions and copy the post title to your secondary field. See documentation:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.