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

Error: Can´t access facebook comment plugin admin page

I had to change the plugin file to make it work. I think it can help someone and even the plugin’s author should consider making these changes. on class-admin.php, create this function at the beggining (can be line 9): function loadXmlByCurl($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = … Read more

No result update a custom field using wp_schedule_event

It think that your problem is the you are passing the post ID as url parameter to facebook API: $url = get_the_ID(); Also, as get_posts return an array of post objects, you could use this code: $posts = get_posts(array(‘numberposts’ => -1) ); foreach($posts as $post) { $url = get_permalink( $post->ID ); $fbcount = json_decode( file_get_contents( … Read more

Insert Facebook button into header [closed]

You need to add position: absolute to your Facebook button. Header.php <div class=”logo”> <a class=”logoimga” title=”Gelnagels Gina” href=”http://www.gelnagels-gina.be/”> <img src=”http://www.gelnagels-gina.be/wp-content/uploads/2015/04/Gina4.png”> </a> <a class=”header-img-1″ title=”Facebook-header” href=”#”> <img src=”http://www.gelnagels-gina.be/wp-content/themes/optimizer/facebook.png”> </a> </div> CSS .header-img-1 { left: 15%; position: absolute; top: 50px; }

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