Open Graph in Index Loop

Short answer: you can’t do that, that’s not what OpenGraph data is, does, or how it works. Long answer: OpenGraph applies to the single post pages only, realistically. When you’re putting a like button (for example) onto each post on a archive page, the like button is going to point to the permalink of the … Read more

How to use author’s avatar as Facebook post preview image when a single post is shared

From your comments, it seems you want to replace the post preview on facebook. This could be hard, because you try to modify the behavior of another webpage. With the opengraph protocol it can be done. add_action( ‘wp_head’, ‘get_facebook_meta_tags’, 10, 0 ); function get_facebook_meta_tags() { global $post; // bail if the post is not in … Read more

OG:Audio facebook meta tags

You are probably using this code in your theme’s header.php. When this file is loaded $post is not available yet (it’ll be inside the Loop). So you’d need to declare before anything global $post;. But that’s not the best approach. If you swap themes, what? Do it again? See: Where to put my code: plugin … Read more

Problems with Open Graph

It is because your markup is invalid which is causing Facebook to think the meta elements are in the body. You can see this by running the page through W3C validator which make sense for the Facebook linter error message: Your page has meta tags in the body instead of the head. This may be … Read more

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