DescriptionDescription
This function allows to render a grid by passing as argument its id.
ArgumentsArguments
Argument | Type | Description |
$grid_id|$args | integer|array | Grid 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.php
, index.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.
]
);