Maximum (limit) number of images in Gallery Shortcode
-
Hey,
I’m using the WordPress inbuilt gallery short code within my theme to display images in the sidebar on the home page
do_shortcode('[gallery columns="1" id="12"]'); ?>
Everything is working fine but I really need to limit the amount of images that are displayed. This is simply a little gallery feature in the sidebar with a title “Images from our Gallery”.
Something like this would be ideal:
do_shortcode('[gallery columns="1" id="12" maximum="5"]'); ?>
Is there any code someone has written, that we can put in our theme functions file to enable a limit to the number of images displayed from the gallery.
Many thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Maximum (limit) number of images in Gallery Shortcode’ is closed to new replies.