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

How to implement custom buttons into individual posts?

Here is a simple way to add custom sharing buttons (just place this code where you want your sharing buttons to be displayed): <?php $twitter_username=”your_twitter_username”; $shortURL = esc_url(get_permalink()); $shortTitle = esc_attr(get_the_title()); $imgURL = wp_get_attachment_url( get_post_thumbnail_id() ); $twitterURL = ‘https://twitter.com/intent/tweet?text=”.$shortTitle.”&amp;url=”.$shortURL.”&amp;via=”.$twitter_username; $facebookURL = “https://www.facebook.com/sharer/sharer.php?u=’.$shortURL; $googleURL = ‘https://plus.google.com/share?url=”.$shortURL; $pinURL = “http://pinterest.com/pin/create/button/?url=”.$shortURL.”&media=”.$imgURL.”&description=’.$shortTitle; ?> <a class=”facebook-btn” href=”https://wordpress.stackexchange.com/questions/191983/<?php echo $facebookURL; ?>” … Read more

Facebook Like – Display counter starting at Zero?

Unfortunately I do not think there is a way to do this. I believe I also read somewhere that modifying the Like button is against Facebook’s Terms of Service, so I would suggest not trying to go that route. Ultimately, Facebook decides what gets shown. You could set a background image under the like button … Read more

file_get_contents_curl pulling wrong values

The usage of curl in PHP is not considered good practice in WordPress. It comes with HTTP API to abstract network requests. It will use curl when available, but still work via other backends if it’s not and allow you to use WP debug plugins to troubleshoot requests, such as Core Control.

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