Check if the value of a field has changed on save_post

Usually there is no way to check if the meta data is updated or not, but you can use updated_postmeta and added_post_meta to get kinda similar functionality. Please have a look at the below code- add_action( ‘updated_postmeta’, ‘the_dramatist_updated_postmeta’, 10, 4 ); add_action( ‘added_post_meta’, ‘the_dramatist_updated_postmeta’, 10, 4 ); function the_dramatist_updated_postmeta( $meta_id, $object_id, $meta_key, $meta_value ) { … Read more

get_post_meta not working inside loop

There is nothing ‘improper’ about the second block of code. Its just written for debugging purposes. The key difference is that that second block used get_the_ID(). Try that. add_action (‘genesis_before_post_content’, ‘gteh_tagline’); function gteh_tagline() { $meta = get_post_meta(get_the_ID(), $field[‘dbt_text’], true); echo $meta; } Or try to pull in $post with global. add_action (‘genesis_before_post_content’, ‘gteh_tagline’); function gteh_tagline() … Read more

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