Hi, mrgermain!
I don’t know how your theme works. However, I believe it’s not using the proper function. Essentially, there are two options for printing a featured image:
- Use the
(get_)the_post_thumbnail function, or
- Use the functions
get_post_thumbnail_id and wp_get_attachment_image_src
Unfortunately, our plugin will only work in your theme if it uses the first option, not the second one. And, apparently, it looks like (according to what you’re saying) your theme is using the second one.
I assume your theme is doing something like this:
$image_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $image_id );
and then it’s using the image somewhere, like this: $image_src[0].
You may simply want to add the following two new lines to fix the issue:
$image_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $image_id );
if ( function_exists( 'uses_nelioefi' ) && uses_nelioefi( get_the_ID() ) )
$image_src = array( nelioefi_get_thumbnail_src( get_the_ID() ) );
This way, we check whether the current post has an external featured image defined (uses_nelioefi) and, if it does, we obtain the appropriate link to the image (nelioefi_get_thumbnail_src). Note we have to return an array, for the original function (wp_get_attachment_image_src) returns also an array.
I hope this makes sense! Please, let us know if it fixed your issue.
It’s been over a month since my last post. Since we had no updates from mrgermain, I’ll mark the topic as resolved!