Link two different post using there post_id in post meta

i GOT THE issues , here is my answer. Now two posts are linked properly. I just need to update the metadata dynamically. add_action( ‘save_post’,’add_menu_custom_event’, 10, 3); function add_menu_custom_event( $post_id, $post, $update ) { /* * In production code, $slug should be set only once in the plugin, * preferably as a class property, rather … Read more

save_post affect creation and deletion

There are something wrong in your code, Here I edited what you tried, function rohs_update_title($post_ID){ $post_type = get_post_type($post_ID); // If this isn’t a ‘rohs_menu’ post, don’t update it. if ( “rohs_menu” != $post_type ) return; $postAuthorId = get_post_field( ‘post_author’, $post_ID ); // get the post author ID $userToGetData=”user_”.$postAuthorId; $restaurantName = get_field( ‘nom_restaurant’, $userToGetData ); $date … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)