• Resolved chhydestiny

    (@chhydestiny)


    Hello developers,

    I’m using “Sahifa wordpress theme” with “Nelio External Featured Image” plugin installed. I set Feature Image of the post or page using the external link by your plugin, I share my website links to Social Networks such as FACEBOOK, I find that the image doesn’t appear.

    Could you help me to get this resolved?
    I appreciate your hard working.. Thanks

    https://www.ads-software.com/plugins/external-featured-image/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi!

    That’s quite easy to fix. Go to functions/theme-functions.php line 1385, where the function tie_og_data is defined. The first lines of the function look like this:

    function tie_og_data() {
      global $post ;
      if ( function_exists("has_post_thumbnail") &&
           has_post_thumbnail() ) {
        $post_thumb = tie_thumb_src( 'slider' ) ;
      } else {
        $get_meta = get_post_custom($post->ID);
        // ...

    Add the following piece of code before the if clause:

    function tie_og_data() {
      global $post ;
      if ( function_exists( 'uses_nelioefi' ) &&
           uses_nelioefi( $post->ID ) ) {
        $post_thumb = nelioefi_get_thumbnail_src( $post->ID );
      } else if ( function_exists("has_post_thumbnail") &&
                  has_post_thumbnail() ) {
        $post_thumb = tie_thumb_src( 'slider' ) ;
      } else {
        $get_meta = get_post_custom($post->ID);
        // ...

    Let us know if it solved your issue!

    And, please, don’t forget to rate and/or comment on our plugin, if you haven’t done it already ??

    Thread Starter chhydestiny

    (@chhydestiny)

    Hello David,

    Only one word is WOW! It works like magic! You are awesome, David! You help me a lots, Thanks thank you so much to help me fixed the issue. ??

    Plugin Author David Aguilera

    (@davilera)

    Glad to help! And, please, rate our plugin!

    Thread Starter chhydestiny

    (@chhydestiny)

    I did ??

    Thread Starter chhydestiny

    (@chhydestiny)

    Hello David,

    Recently I updated my wordpress sahifa theme to the new version 5.3.0. It seem like this solution is no longer working. After changing the code again, I got an error message on the website show that something went wrong in my …//functions/theme-functions.php. May you please take a look at this issue again? (Plugin version 1.2.0)

    I appreciate that..

    Best regard,

    I am using dazzling theme and I am having the same problem. Image is not showing up on facebook share. Is there a better solution other than hard coding theme core file as it is painful during update.

    Well I was using 1.3 version but after installing 1.2.0 version the facebook image problem is gone.

    Plugin Author David Aguilera

    (@davilera)

    Hi guys!

    If you want the featured image to appear on your social networks, you have to look for the following meta tag in your theme:

    <meta property="og:image" content="..." />

    This meta property, which has to be placed in the head of your site, specifies the URL of the featured image in the content attribute.

    @chhydestiny, if you take a look at the function I modified for you one month ago, it returns all the relevant meta information for Facebook (og in tie_og_data stands for “open graph”).

    Anyway, try adding the following piece of code in your functions php:

    if ( ! function_exists( 'nelioefi_add_image_for_sharing' ) ) {
      add_action( 'wp_head', 'nelioefi_add_image_for_sharing', 99 );
      function nelioefi_add_image_for_sharing() {
        $image = nelioefi_get_thumbnail_src( get_the_ID() );
        if ( $image ) {
          echo "<meta property=\"og:image\" content=\"$image\" />";
        }
      }
    }

    That should do the trick!

    HI i added the following code to my function.php in my child theme folder. is there anything else i need to do in order to make featured image to appear in my social media ? a step by step guide will be very useful. thank you !

    if ( ! function_exists( ‘nelioefi_add_image_for_sharing’ ) ) {
    add_action( ‘wp_head’, ‘nelioefi_add_image_for_sharing’, 99 );
    function nelioefi_add_image_for_sharing() {
    $image = nelioefi_get_thumbnail_src( get_the_ID() );
    if ( $image ) {
    echo “<meta property=\”og:image\” content=\”$image\” />”;
    }
    }
    }

    Plugin Author David Aguilera

    (@davilera)

    Can you please share a link to one post in your blog, @nevillo2?

    I’d like to see if the code you added works as expected.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Thumnail doesn't show on Social Networking’ is closed to new replies.