SPRING SALE

00000000

30% OFF - Limited Time Deal

wpgb_render_grid

DescriptionDescription

This function allows to render a grid by passing as argument its id.

Arguments Arguments

ArgumentTypeDescription
$grid_id|$argsinteger|arrayGrid id | Grid arguments

ExampleExample

PHP
functions.php
// Render grid id 1.
wpgb_render_grid( 1 );

This function can also replace the main loop of the archive.phpindex.php or search.php files. In this case you need to pass as argument an array to define the grid id and is_main_query to true.

PHP
template.php
wpgb_render_grid(
	[
		'id' => 1, // Grid id.
		'is_main_query' => true, // To replace loop in archive/index/search.php templates.
	]
);