How to get the Tags on Publish post hook?

Found Solution : If there is no data in the request_body, the we can also fetch it from the postID which is already we have. Changed Code: added condition if data not available, then get it from post id public static function saveDataInNotificationTable($ID,$request_body) { $post_data = json_decode($request_body); $tags = $post_data->tags; if($post_data == “” || $post_data … Read more

OG Meta Tags not being scraped by facebook or twitter

Pop your website into the facebook debugger. https://developers.facebook.com/tools/debug/sharing/ This will do 2 things: Flush the cached version of your site Facebook has stored. Tell you any problems with sharing data that may prevent those OG tags being used. In the event of no errors and cache refreshed, you can then share your link again and … Read more

Line of Tag information Is Formatted Strange

It’s because of some CSS that you have. This is what causes your problem, the float:left utility a { height: 30px; line-height: 30px; display: inline-block; float: left; letter-spacing: 0; } Add the code that generates your tags in a div with “float: none”

Get tags for post_type

It should work: global $wpdb; // set the target relationship here $post_type=”post”; $taxonomy = ‘tag’; $terms_ids = $wpdb->get_col( $wpdb->prepare( ” SELECT tt.term_id FROM {$wpdb->term_relationships} tr, {$wpdb->term_taxonomy} tt, {$wpdb->posts} p WHERE 1=1 AND tr.object_id = p.id AND p.post_type=”%s” AND p.post_status=”publish” AND tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy =’%s’ “, $post_type, $taxonomy ) ); // here you are … Read more

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