Title: Corrupted page when insert post grid shortcode
Last modified: September 3, 2016

---

# Corrupted page when insert post grid shortcode

 *  [luisserrano](https://wordpress.org/support/users/luisserrano/)
 * (@luisserrano)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/corrupted-page-when-insert-post-grid-shortcode/)
 * This plugin looks like not compatible with [Post Grid](https://es.wordpress.org/plugins/post-grid/).
 * If a page or post has a Post Grid shortcode and Nelio External Featured Image
   working in same page or post, the internal links system break down.

Viewing 1 replies (of 1 total)

 *  Plugin Author [David Aguilera](https://wordpress.org/support/users/davilera/)
 * (@davilera)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/corrupted-page-when-insert-post-grid-shortcode/#post-8076305)
 * Hi!
 * After a couple of tests with Post Grid (I never used it before), I think I know
   what’s amiss. In order to make Post Grid compatible with our plugin, I’m afraid
   you’ll have to edit the former.
 * Open `includes/functions.php` and take a look at line 18:
 *     ```
       if($media_source == 'featured_image'){
         $thumb = wp_get_attachment_image_src( &hellip; );
         $thumb_url = $thumb['0'];
   
         if(!empty($thumb_url)){
           &hellip;
         } else {
           &hellip;
         }
       }
       elseif &hellip;
       ```
   
 * This is where the “regular” featured image is obtained (if any) and returned.
   As I said in other threads and the FAQ of our plugin, NelioEFI doesn’t work when
   the theme (or plugin in this case) uses `wp_get_attachment_image_src` for obtaining
   the URL of a featured image (WordPress doesn’t offer any hooks for tweaking the
   result of that function).
 * Well, you simply need to tweak that block, so that Nelio’s featured image is 
   retrieved (if any):
 *     ```
       if($media_source == 'featured_image'){
         $thumb = wp_get_attachment_image_src( &hellip; );
         $thumb_url = $thumb['0'];
   
         if ( function_exists( 'uses_nelioefi' ) &&
              uses_nelioefi( get_the_ID() ) ) {
           $thumb_url = nelioefi_get_thumbnail_src( get_the_ID() );
         }//end if
   
         if(!empty($thumb_url)){
           &hellip;
         } else {
           &hellip;
         }
       }
       elseif &hellip;
       ```
   
 * This small `if` block checks if our plugin is installed and if the current post
   is using Nelio’s external featured image. If they do, it obtains the URL of this
   image using Nelio’s function `nelioefi_get_thumbnail_src`.
 * This should probably fix your issue. However, keep in mind your changes will 
   be reverted whenever Post Grid is updated, so save this thread somewhere.
 * Let me know if it worked!
 * Best,
    David

Viewing 1 replies (of 1 total)

The topic ‘Corrupted page when insert post grid shortcode’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [David Aguilera](https://wordpress.org/support/users/davilera/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/corrupted-page-when-insert-post-grid-shortcode/#post-8076305)