Featured image not showing on facebook share
Featured image not showing on facebook share
Featured image not showing on facebook share
WordPress Sumo Plugin not showing all images on clicking pinterest icon
Try This for IF : if(!empty($user->user_url)) { // OUTPUT } All Code $website = $user->user_url; if(!empty($user->user_url)) { printf(‘<a href=”https://wordpress.stackexchange.com/questions/353378/%s”>%s</a>’, $user->user_url, ‘<i class=”icon-home”></i>’); } $twitter = get_user_meta($user->ID, ‘twitter_profile’, true); if(!empty($twitter)) { printf(‘<a href=”https://wordpress.stackexchange.com/questions/353378/%s”>%s</a>’, $twitter, ‘<i class=”icon-twitter”></i>’); } $facebook = get_user_meta($user->ID, ‘facebook_profile’, true); if(!empty($facebook)) { printf(‘<a href=”https://wordpress.stackexchange.com/questions/353378/%s”>%s</a>’, $facebook, ‘<i class=”icon-facebook”></i>’); } $google = get_user_meta($user->ID, ‘google_profile’, true); if(!empty($google)){ … Read more
Theres a hacky javascript way I’ve used before which is to use appendChild() to add a Font Awesome icon to the parent node. There will be a container for the icons, find its ID or class and save to a variable, add your icon html (or img tag) to a variable also, then use parent.appendChild(variableNameOfIcon); … Read more
This was resolved by adding a site icon 🙂
Yes, WordPress ships an icon set by default called Dashicons. They do have some social icons as well, as can be seen here. To use them on the frontend, enqueue the dashicons library and use them like so <h2 class=”dashicons-before dashicons-smiley”>A Cheerful Headline</h2> <h2><span class=”dashicons dashicons-smiley”></span> A Cheerful Headline</h2> (taken from the docu)
How to create social Share Buttons Without Plugin
Try copying the following code into your functions.php file. It adds a custom og:image property for the authors with nicenames of michelle-robinson, mystery-man, john-smith, and a default fallback image, respectively. You can easily change this to suit your needs. add_action( ‘wp_head’, ‘wpse_70701_author_image’ ); function wpse_70701_author_image() { if ( is_author( ‘michelle-robinson’ ) ) { // set … Read more
I’m not sure if you are using BuddyPress or not, but there is a functionality there using this plugin FollowMe. This would assume you are running a site with some membership capabilities.
Within a function or method, the return statement immediately stops the execution of the earlier. Hence the last line never gets interpreted. Switch the order of this: return $social_score; update_post_meta($post_id, ‘_social_score’, $social_score); to this: update_post_meta($post_id, ‘_social_score’, $social_score); return $social_score; Update: You are using three different variables for the post id, namely: $post_ID, $post_id and $post->ID. … Read more