Support » Plugin: Easy Image Gallery » The original php script does not work

  • Resolved Superbobo75

    (@superbobo75)


    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 1 year, 9 months ago by Superbobo75.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stanko Metodiev

    (@metodiew)

    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 🙂

    Best! 🙂

    Plugin Author Stanko Metodiev

    (@metodiew)

    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.