• Hello,

    We need to hide all the information that we have currently displaying in the alt description field of the NG Gallery showing thumbnails on a page. (We don’t want to delete them because there are thousands of file and we will need to display that information again at some point.)

    See sample image on front-end.

    See sample image on back-end.

    I tried hiding it in the CSS, but that didn’t work because it is in the same SPAN as the alt title, which we still need to show.

    I tried to delete the line of code in the php file, but nothing happened. What file and line of code do I need to remove so that it will not show that information?

    I’ve tried removing it from:
    nextgen_basic_gallery > templates > thumbnails > index.php

    The line of code I removed was:
    data-description="<?php echo esc_attr(stripslashes($image->description)); ?>"

    from the code below:

    <div class="ngg-gallery-thumbnail">
                <a href="<?php echo esc_attr($storage->get_image_url($image, 'full', TRUE))?>"
                   title="<?php echo esc_attr($image->description)?>"
                   data-src="<?php echo esc_attr($storage->get_image_url($image)); ?>"
                   data-thumbnail="<?php echo esc_attr($storage->get_image_url($image, 'thumb')); ?>"
                   data-image-id="<?php echo esc_attr($image->{$image->id_field}); ?>"
                   data-title="<?php echo esc_attr($image->alttext); ?>"
                   data-description="<?php echo esc_attr(stripslashes($image->description)); ?>"
                   <?php echo $effect_code ?>>
                    <img
                        title="<?php echo esc_attr($image->alttext)?>"
                        alt="<?php echo esc_attr($image->alttext)?>"
                        src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name, TRUE))?>"
                        width="<?php echo esc_attr($thumb_size['width'])?>"
                        height="<?php echo esc_attr($thumb_size['height'])?>"
                        style="max-width:none;"
                    />
                </a>
            </div>

    Thanks for any guidance.
    Antonella

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 1 replies (of 1 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @antorera – You appear to be displaying the image “caption” (read: description field) … with the NextGEN Basic Thumbnail display this is only done by using the “caption” template.

    – Cais.

Viewing 1 replies (of 1 total)

The topic ‘Remove alt description field from template’ is closed to new replies.