• When I use the shortcode to display a gallery on a page, the gallery is then displayed twice as it is also automatically added to the page.

    I have used CSS to hide the one I don’t want to display but from a development point of view this is not an elegant approach.

    How can I prevent the gallery from automatically displaying so that only the one inserted via shortcode will display?

    https://www.ads-software.com/plugins/easy-image-gallery/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Can you show me a screenshot of your page in the admin and provide a live URL for the front-end? When you use the shortcode within the content editor, it should remove the default one

    I also have the same problem. I have used the shortcode once in the content area and it shows like this:

    https://www.sbs.lk/sample/

    @aselaearthling Are you able to give me admin access so I can take a closer look? [email protected]. I’ll seeing some invalid HTML on your page. Have you got the shortcode inside any other shortcodes or code? And if so, can you move them out and test?

    I have placed the shortcode inside the page builder as i have other content in the page where i want to use this plugin. When i move it out it works fine. Is there any other way i can use inside the page builder?

    It seems like page builders break WP’s has_shortcode function which Easy Image Gallery and many other plugins rely on. I’ll do some digging and see if it’s something I can fix on my end.

    This is a workaround. Place this into your child theme’s functions.php.

    remove_filter( 'the_content', 'easy_image_gallery_append_to_content' );

    Thread Starter LABCAT

    (@labcat)

    Yeah,

    I was using a page builder as well.

    It should be the page builder to fix the issue then? and not your plugin?

    Thank you very much for your help and workaround.

    No problem, did the workaround work?

    Yeah, ideally they should try and fix it as it looks like it’s messing with a core WP function.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Gallery Displays Twice’ is closed to new replies.