Limit number of images displayed using the Gallery Shortcode

  • Unknown's avatar

    Hi,
    Does anyone know how to limit the number of images shown when using the Gallery Shortcode ?

    In short, I have an XML import (using WP-ALL-IMPORT) going into Easy Property Listings Plugin.

    From within the EPL code I am using the Gallery shortcode. I can get it to remove the Featured images from the thumbnails – but I only want to show the next 3 images on this summary page.

    The call is as follows :
    echo do_shortcode(‘[gallery size="thumbnail" exclude="' . get_post_thumbnail_id( $post->ID ) . '"]‘);

    Is there a way to get it to display the first 3 images from the gallery.

    I am aware that you can specify the IDs – but the gallery is being updated every day so this isn’t practical.

    Any help would be greatly appreciated as I am quickly going mad with this one !!!!

    Thanks

  • Unknown's avatar

    Apologies – supposed to be on wordpress.org.

  • Unknown's avatar

    Apologies – supposed to be on wordpress.org.

  • The topic ‘Limit number of images displayed using the Gallery Shortcode’ is closed to new replies.