Title: Plugin not working with Codestag Template /
Last modified: August 22, 2016

---

# Plugin not working with Codestag Template /

 *  Resolved [mrgermain](https://wordpress.org/support/users/mrgermain/)
 * (@mrgermain)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/plugin-not-working-with-codestag-template/)
 * Hi,
 * I’m trying to set up your plugin with “Ink” template from Codestag, but it’s 
   not working…
    I tried adding the code to CSS, with no effect.
 * I’m no CSS / PHP expert, but I had a quick look at the template and I was able
   to found the “get_post_thumbnail_id() );” function so I suppose it should be 
   OK to work…
 * Can you help me on this one ?
    Website is available at mrgermain.fr
 * Thanks !
 * [https://wordpress.org/plugins/external-featured-image/](https://wordpress.org/plugins/external-featured-image/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [David Aguilera](https://wordpress.org/support/users/davilera/)
 * (@davilera)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/plugin-not-working-with-codestag-template/#post-5821455)
 * 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:
    1. Use the `(get_)the_post_thumbnail` function, or
    2. 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.
 *  Plugin Author [David Aguilera](https://wordpress.org/support/users/davilera/)
 * (@davilera)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/plugin-not-working-with-codestag-template/#post-5821622)
 * Any updates?
 *  Plugin Author [David Aguilera](https://wordpress.org/support/users/davilera/)
 * (@davilera)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-not-working-with-codestag-template/#post-5821633)
 * It’s been over a month since my last post. Since we had no updates from mrgermain,
   I’ll mark the topic as resolved!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin not working with Codestag Template /’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-featured-image_947a5f.svg)
 * [Nelio External Featured Image (discontinued) - Available in Nelio Content](https://wordpress.org/plugins/external-featured-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-featured-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-featured-image/)
 * [Active Topics](https://wordpress.org/support/plugin/external-featured-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-featured-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-featured-image/reviews/)

## Tags

 * [featured image](https://wordpress.org/support/topic-tag/featured-image/)

 * 3 replies
 * 2 participants
 * Last reply from: [David Aguilera](https://wordpress.org/support/users/davilera/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-not-working-with-codestag-template/#post-5821633)
 * Status: resolved