So I’ve solved the issue by looping through all of the items by class and indexing them with a data attribute.
$( '.tiled-gallery').each(function(){
var i = 0;
$(this).find('.tiled-gallery-item').each(function(){
$(this).attr( 'data-index', i );
i++;
})
})
Related Posts:
- Add Lightbox To WordPress Native Gallery
- Filter specific shortcode output?
- add_filter and changing output captions of image gallery
- How to add attribute to output with wp_video_shortcode add_filter
- Change default settings used by gallery shortcode
- Ajax, filters and shortcodes
- Removing labels and tag on WordPress’s default login form
- Error when overriding only some audio shortcode HTML output
- WP Filter to change the URL of an Anchor wrapping the last gallery image
- How to filter backend post list showing only posts having a shortcode
- Need to return shortcode text instead of the output
- WordPress hooks/filters insert before content or after title
- How do filters and hooks really work in PHP
- Trouble understanding apply_filters()
- Filter hook before create order WooCommerce
- wp_mail – Remove sitename from email subject
- apply_filters() slices away needed arguments
- WP Rest API – Upload media without saving attachment post
- Using variable from one filter in another filter
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- Search content for shortcodes and get parameters
- Please explain me what the do_action does
- Is it possible to Hook/Filters Attachment Creation?
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- WordPress RSS feed – filter RSS content by custom field value
- How to hook some Unicode texts into calendar widget safely?
- How to add attributes to tag when template cannot be directly modified
- manipulate a plugins shortcode
- How can I add a fifth option to the alignment picker?
- Filter the URL of next_posts_link & previous_posts_link
- how to remove filter from wordpress shortcode output
- How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
- Customize user account activation message
- Conditionally call add_action depending on post_type?
- WordPress tag cloud add more links
- Gutenberg disable the “block” tab in right sidebar
- Yoast SEO hooks overriding themselves
- Editing
- Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
- How to call a function or method that is Namespaced using another plugin
- Question about how do wordpress filters/actions work
- How to center oEmbedded content
- Change username before login
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- How to change the order of HTML output of a core block?
- How to removes all instances of thumbnails displayed in my theme?
- Shortcodes — Using add_action, add_filter in the shortcode
- How to know what filter to use and how to use it?
- What hooks to hook onto for automatic cache clearing
- Modify Redux Framework Options in Child Theme
- How to customize category_description()?
- How can I output all apply_filters and do_action?
- Is it possible to override the default Gallery Settings form?
- Set default value for “Additional CSS class(es)” for specific block types
- Disadvantage of using filters & hooks multiple times
- WordPress add script with custom type (x-jquery-tmpl)
- run shortcode in excerpt of single custom post type
- Admin post list – adding an option to the date filter dropdown
- How to add a filter to the get_body_class function?
- Nested Gallery Shortcode INTERMITTENTLY working
- How to override include_once pointed file using add_filter?
- How to use do_shortcode_tag to modify the output of a shortcode?
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- How to change dynamically page title according to variable data?
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- WordPress removing slashes from shortcode output
- comment_for() Custom fields not visible when user is logged in
- What is the action hook to use if you want to capture the new password during password change?
- Get_template_part inside filter?
- custom gallery filter with image caption as link title?
- How to remove shortcode(s) from WYSIWYG Page editor for Non Admins
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- Gallery stripped from excerpt of post
- Shortcode / plugin with custom (flexible) output
- BuddyPress – A hook available to hide custom born date on public profile view?
- The gettext hook doesnt work on text with links
- Hooked into wp_get_attachment_caption to add content to the default description; not working for jetpack slideshow. Why?
- the_content getting current page content instead specified ID
- “The editor has encountered an unexpected error” After add defer tag to java script
- Add an attribute to the root from functions.php with add_filter
- Would like to use hook or filters to customize email templates
- Override wordpress audio playlist
- Hook to add content after date in post?
- Is it possible to assign a css id to a row in plugins list table?
- Remove image of srcset
- Filter wp_mail based on content type
- Add HTML to the bottom of each post in a post list
- Incrementing content with extra text after save/publish
- wp_editor customization
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Is it possible to include the add_filter() function within a shortcode function
- Activate short codes for all post queries?
- Filter dashboard custom post listing by user
- Admin New Order: Autofocus on Search a product
- NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]
- How to filter part of a variable if it is no array?
- How do you disable the verification process of user email changes?
- Can you call a filter hook by “add_action”?
- This code works, but breaks the media uploader. How do I integrate it in a way that won’t?