Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

Filters and events

Updated 2 min read 1 view
FilterUse
vlt_grid_query_argsWP_Query arguments of a grid.
vlt_grid_item_htmlHTML of one item.
vlt_grid_configA layout’s settings after they are read.
vlt_grid_css_classesClasses listed in the Custom CSS help (Pro).
vlt_grid_empty_messageThe “No items found” text.
vlt_grid_breakpointsTablet and mobile widths.
vlt_grid_image_sizeImage size of a layout.
vlt_grid_sourcesContent sources of the editor.
vlt_grid_template, vlt_grid_template_varsWhich template file is used, and its variables.
vlt_grid_filter_terms_argsTerms shown in the filter.
vlt_grid_lightbox_enabledTurn the lightbox on or off in code.
vlt_grid_insert_shortcodesShortcodes offered in the Inserts list (Pro).

JavaScript events

Events fire on the grid and bubble, so you can listen on document. Re-run sliders, lightboxes or lazy loaders on vlt-grid:updated.

EventWhen
vlt-grid:initThe grid is ready (also for grids added later with vltGridBuilder.init()).
vlt-grid:before-loadA filter, page or Load More request starts. Cancelable: event.preventDefault() stops it.
vlt-grid:updatedNew items are in the page (event.detail.items).
vlt-grid:filtered, vlt-grid:searched, vlt-grid:paginatedAfter updated, by what changed.
vlt-grid:errorThe request failed.
document.addEventListener( 'vlt-grid:updated', ( event ) => {
	myLightbox( event.detail.items );
} );

// Grids inserted later (a modal, a tab)
vltGridBuilder.init( container );
Was this article helpful?