You can use the the following attributes for the gallery shortcode:
The problem with this is that the gallery shortcode wraps the image and the caption in different elements(thats why the default solution is using dl-dt-dd), so this will generate one li element for the image, and one for the caption. You can still style it using CSS though, because both of the element has unique classnames.
Related Posts:
- Check if post/page has gallery?
- Automatically add this attribute to the gallery shortcode
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- WordPress gallery ‘post_gallery’ filter doesn’t work with feeds?
- conditional shortcode not working
- Remove width and height attributes from [gallery] output
- Gallery shortcode menu order fix no longer working on WordPress 4.0
- conditional shortcode not working
- Some doubts about gallery shortcode in WordPress
- Should I cache default WordPress gallery shortcode output?
- Numbering Image List in Gallery
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- change wordpress gallery shortcode to slider
- Remove hyperlink on gallery shortcode
- Add custom setting that uses radio button to WP Gallery
- WordPress Gallery shortcode: Display one category ID only
- How to get gallery id inserted to a post?
- Check if post has gallery images/media
- How to Modify WordPress Default Image Gallery Shortcode
- Change WordPress Shortcode added in to post
- Gallery shortcode – change link file image size? (not using default fullsize image)
- add action only if gallery shortcode attribute is equal to?
- Unable to the get the gallery inserted between shortcodes
- Adding shortcode field to edit gallery / Gallery Settings
- How to change the output of gallery shortcode
- Replacement for gallery_shortcode function not taking all attributes
- How to Retrieve data of Gallery Shortcode and display it above a post
- How to copy [gallery] shortcode between posts using polylang [closed]
- Which file renders the “Edit Gallery” Settings page?
- How to display NextGEN gallery in templates?
- Use full size images in a specific gallery
- How to Enable embedding WordPress default gallery in comments?
- How to add new images to existing shortcode configuration?
- Gallery shortcode is empty but magically creates a gallery
- Can we add a single caption to the gallery shortcode?
- Automatically add class-attribute to gallery?
- Replace custom gallery shortcode with default gallery shortcode
- WordPress Gallery with ID’s Shortcode not Working
- Remove width and height attributes from [gallery] output
- Changing layout of defaul gallery output to masonry
- What makes a placeholder resizable in Tinymce?
- how to show last 5 images from the one post gallery
- Gallery Shortcode: using size=”full” doesn’t call the actual thumbnail image size
- Native “playlist” shortcode random playing… How?
- How to add ‘class’ attribute into shortcode [audio]?
- Make shortcode work with nested double quotes
- Finding where a shortcode comes from
- How to check if a shortcode is being executed in a widget or post
- TinyMCE popup windows using WP functions
- wpautop() when shortcode attributes are on new lines break args array
- How to display the comment_form with a shortcode while removing it from its default position?
- How to use shortcodes on a widget sidebar when doing an ajax call?
- Error: The Content Area Was Not Found in Your Page
- How do I require a file in a shortcode?
- Custom Shortcodes Giving error on development site
- Shortcode does not work, changes html order
- Using API to generate short link
- Enclosing Shortcode Within Another Enclosing Shortcode Breaks Output Functionality
- How do you pass parameters TO a shortcode?
- Video shortcode – autoplay all videos
- How do i display the built-in gallery inside a widget?
- passing parameters to do action from shortcode to wp_footer
- Shortcode not working on static front page
- How to add class or id to shortcode HTML elements?
- Changing the title tag from a shortcode
- WordPress wpautop/shortcode generating invalid markup
- Remove ‘p’ tags around shortcodes and ‘img’
- Forcing max-width for image captions
- WordPress Short code with additional parameter
- Creating a short code with php inside
- Is it possible to modify the header with a content shortcode?
- this simple shortcode doesn’t generate Collapse as supposed
- Shortcode outputting at top of content
- Will a shortcode placed inside a paragraph tag still be valid?
- Shortcode Strategy
- Enclosing Shortcode is acting like self-closing
- How do I define and register a shortcode function in a namespaced functions.php file?
- Change user meta value with shortcode
- Implementing a URL Shortener
- WordPress User ID as Shortcode
- find shortcode inside content of post
- WordPress Short code for List style
- Show content if user left comment / non-logged visitors?
- How to insert current user ID/entry ID into a shortcode?
- Need help with creating a simple shortcode
- Using a WP shortcode in Homepage
- i want to show a modal when user lands on home page very first time
- Logout user if click on a custom page link
- Shortcode Attribute not defined
- Second attribute of shortcode is not changing why?
- Is Post-Author-Id shortocde
- Load next post by ID on a single page
- Add catagory attribute to custom shortcode
- How to not show shortcode contents if cart is empty?
- Help with Shortcode Functionality
- Shortcode Site include in a other
- How do write this type shortcode? [closed]
- WordPress functions.php shortcode is not working [closed]
- My first WordPress shortcode just returning []
- I have the query code but not the shortcode