Title: The original php script does not work
Last modified: February 16, 2018

---

# The original php script does not work

 *  Resolved [Superbobo75](https://wordpress.org/support/users/superbobo75/)
 * (@superbobo75)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/the-original-php-script-does-not-work/)
 * in the original version, it was only possible to know if the gallery existed.
   But how do I find out in the new version of PHP in the post template what ID 
   is for this post?
    Just when it’s the first created gallery – in post / page.
   And this should also ensure backward functioning for the original php script.
 * Or, how do I use a gallery if I want to embed it universally into a template?
 * previously worked:
 * <? php if (function_exists (‘easy_image_gallery’)) {
         echo easy_image_gallery();}?
   >
 * This is really a crucial modification to the plugin’s functionality, when it 
   completely disrupted the PHP insertion operation.
    -  This topic was modified 8 years, 3 months ago by [Superbobo75](https://wordpress.org/support/users/superbobo75/).

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

 *  Plugin Author [Stanko Metodiev](https://wordpress.org/support/users/metodiew/)
 * (@metodiew)
 * [8 years ago](https://wordpress.org/support/topic/the-original-php-script-does-not-work/#post-10254541)
 * Hey,
 * We have updated the plugin with the new version 1.3.1 where we have added a fallback.
 * Now, if you are using:
 *     ```
       if ( function_exists ('easy_image_gallery') ) {
           echo easy_image_gallery();
           remove_filter( 'the_content', 'easy_image_gallery_append_to_content' );
       }
       ```
   
 * in your template, the plugin will display the first gallery in your post/page.
   If you have more than one gallery, you’ll need to use:
 *     ```
       if ( function_exists ('easy_image_gallery') ) {
           echo easy_image_gallery( 759 );
           remove_filter( 'the_content', 'easy_image_gallery_append_to_content' );
       }
       ```
   
 * where 759 is the ID of the gallery.
 * Let us know if you have any questions 🙂
    -  This reply was modified 8 years ago by [Stanko Metodiev](https://wordpress.org/support/users/metodiew/).
 *  Thread Starter [Superbobo75](https://wordpress.org/support/users/superbobo75/)
 * (@superbobo75)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/the-original-php-script-does-not-work/#post-10388335)
 * Best! 🙂
 *  Plugin Author [Stanko Metodiev](https://wordpress.org/support/users/metodiew/)
 * (@metodiew)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/the-original-php-script-does-not-work/#post-10388709)
 * Awesome, glad it worked! I’ll make the ticket as closed ^_^

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

The topic ‘The original php script does not work’ is closed to new replies.

 * ![](https://ps.w.org/easy-image-gallery/assets/icon-256x256.png?rev=2235126)
 * [Easy Image Gallery](https://wordpress.org/plugins/easy-image-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-image-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-image-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-image-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-image-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-image-gallery/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Stanko Metodiev](https://wordpress.org/support/users/metodiew/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/the-original-php-script-does-not-work/#post-10388709)
 * Status: resolved