Skip to main content
Bumped by Community user
Bumped by Community user
copyedit for readability
Source Link
Nathan Johnson
  • 6.5k
  • 6
  • 30
  • 49

How to stop updateWordPress from updating the post meta

iI have tried using many hooks to achieve this , i. I don't want one of my post meta to be updated when we update post  .

iI tried doing something like :

add_filter( 'update_post_metadata', 'wpse_163859', 10, 5 );
function wpse_163859( $check, $object_id, $meta_key, $meta_value, $prev_value )
{
    return false;
}

iI tried looking at meta.phpmeta.php in wp-includes  , tried whole day with lots of code  , appreciate any help  .

stop update post meta

i have tried using many hooks to achieve this , i don't want one of my post meta to be updated when we update post  .

i tried doing something like :

add_filter( 'update_post_metadata', 'wpse_163859', 10, 5 );
function wpse_163859( $check, $object_id, $meta_key, $meta_value, $prev_value )
{
    return false;
}

i tried looking at meta.php in wp-includes  , tried whole day with lots of code  , appreciate any help  .

How to stop WordPress from updating the post meta

I have tried using many hooks to achieve this. I don't want one of my post meta to be updated when we update post.

I tried doing something like :

add_filter( 'update_post_metadata', 'wpse_163859', 10, 5 );
function wpse_163859( $check, $object_id, $meta_key, $meta_value, $prev_value )
{
    return false;
}

I tried looking at meta.php in wp-includes, tried whole day with lots of code, appreciate any help.

Source Link
Den Pat
  • 189
  • 7

stop update post meta

i have tried using many hooks to achieve this , i don't want one of my post meta to be updated when we update post .

i tried doing something like :

add_filter( 'update_post_metadata', 'wpse_163859', 10, 5 );
function wpse_163859( $check, $object_id, $meta_key, $meta_value, $prev_value )
{
    return false;
}

i tried looking at meta.php in wp-includes , tried whole day with lots of code , appreciate any help .