• Resolved retrojimmy

    (@retrojimmy)


    It seems that I can select random images in the widget from all or specific galleries but it would be much more useful for my use case (and perhaps others’) to select random images from specific tag(s). Is this possible? If not, anybody know what code modification would be required? Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Imagely

    (@imagely)

    Hi @retrojimmy,

    You can try using a shortcode construction like the one from below to see if that’ll work for you ( please make sure to use your own tag names instead of tag1-3) :

    [ngg src="tags" ids="tag1,tag2,tag3" display="basic_thumbnail" order_by="rand()"]

    Thread Starter retrojimmy

    (@retrojimmy)

    Thanks – that’s superb! I’ve been trying to find documentation on using shortcodes but couldn’t find a definitive resource. the shortcode doesn’t quite mimic the random picture widget because the thumbnails are bigger and there is no limit to the number of picture used (which causes pagination).

    I found that adding images_per_page=”6″ limits the images but still the thumbs need to be resized – any ideas on…
    – On how to specify the thumbnail size (I will then try number_of_columns=”3″)
    – How to hide pagination
    Then it would be perfect for me. Thanks again for the original reply and thanks in advance for any follow-up (if can’t be done, that’s also useful to know). James

    Plugin Contributor Imagely

    (@imagely)

    Hi @retrojimmy

    There is such a possibility to use a custom value for the thumbnails’ size:

    [ngg src="tags" ids="tag1,tag2,tag3" display="basic_thumbnail" override_thumbnail_settings="1" <strong>thumbnail_width="250" thumbnail_height="150" thumbnail_crop="0"</strong> order_by="rand()"]

    Unfortunately, there’s no such a parameter to hide the pagination. You can globally hide the pagination for all of the NGG galleries adding this CSS to "Appearance -> Customize -> Additional CSS"

    .ngg-navigation {
        display: none !important;
    }
    Thread Starter retrojimmy

    (@retrojimmy)

    Thanks again – really appreciated!

    I settled with
    [ngg src="tags" ids="fav" display="basic_thumbnail" override_thumbnail_settings="1" thumbnail_width="100" thumbnail_height="75" thumbnail_crop="0" images_per_page="6" number_of_columns="3" order_by="rand()"]

    and for the CSS, I only wanted navigation to be hidden in the sidebar (for my current template) and not in content so I used:

    #secondary .ngg-navigation {display: none !important;}

    This very closely mimics the original widget. I’ll see if there is a formal feature request for the widget,

    Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Random Image Widget based on tags’ is closed to new replies.