• Hi there,

    I am using the Simply Gallery Slider block on a page to show images. I recognized, that the plugin creates some hidden div (for lazy loading?) that contains media attachment permalinks for all images:

    <div class="wp-block-group alignfull has-ast-global-color-2-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:0;padding-right:0px;padding-bottom:0px;padding-left:0px"><div class="pgc-sgb-cb wp-block-pgcsimplygalleryblock-slider " data-gallery-id="f0a47099" style="min-height:460px"><div class="sgb-preloader" id="pr_f0a47099">
    	<div class="sgb-square" style="background:#d4d4d4"></div>
    	<div class="sgb-square" style="background:#d4d4d4"></div>
    	<div class="sgb-square" style="background:#d4d4d4"></div>
    <div class="simply-gallery-amp pgc_sgb_slider " style="display: none;"><div class="sgb-gallery"><div class="sgb-item"><a href="https://bensmann-immobilien.de/161283c6-5b09-4de9-ae36-21ba68aa8723/" target="_blank"><img decoding="async" alt="" width="300" height="225" loading="lazy" src="https://bensmann-immobilien.de/wp-content/uploads/2024/01/161283c6-5b09-4de9-ae36-21ba68aa8723-300x225.jpg" srcset="https://bensmann-immobilien.de/wp-content/uploads/2024/01/161283c6-5b09-4de9-ae36-21ba68aa8723-300x225.jpg 300w,https://bensmann-immobilien.de/wp-content/uploads/2024/01/161283c6-5b09-4de9-ae36-21ba68aa8723-1024x768.jpg 1024w,https://bensmann-immobilien.de/wp-content/uploads/2024/01/161283c6-5b09-4de9-ae36-21ba68aa8723.jpg 1600w" sizes="250px"/></a></div>...

    Is there a way to prevent Simply Gallery from adding those permalinks to the source code? I would like to hide it from crawlers.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author GalleryCreator

    (@gallerycreator)

    Hi

    This container (DIVs) is designed to display your images in browsers with JavaScript disabled and for for search engines. But if you don’t need all this, then you can go to the plugin file (wp-content/plugins/simply-gallery-block/blocks/init.php) and change this line 120

    return $noscript; to return '';

    If you edit this file incorrectly, you can break your site, so it all depends on your skill.

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent Simply Gallery from using attachment permalinks in source code’ is closed to new replies.