wpgb_render_grid
This function allows to render a grid by passing as argument its id.
Argument |
Type |
Description |
$grid_id|$args |
integer|array |
Grid id | Grid arguments |
[pastacode lang=”php” manual=”%2F%2F%20Render%20grid%20id%201.%0Awpgb_render_grid(%201%20)%3B” message=”” highlight=”” provider=”manual”/]
This function can also replace the main loop of thearchive.php
,index.php
orsearch.php
files. In this case you need to pass as argument an array to define the gridid
andis_main_query
totrue
[pastacode lang=”php” manual=”wpgb_render_grid(%20%0A%09%5B%20%0A%09%09’id’%20%3D%3E%201%2C%20%2F%2F%20Grid%20id.%0A%09%09’is_main_query’%20%3D%3E%20true%2C%20%2F%2F%20To%20replace%20loop%20in%20archive%2Findex%2Fsearch.php%20templates.%0A%09%5D%0A)%3B” message=”” highlight=”” provider=”manual”/]