Please note, this is a STATIC archive of website www.themepunch.com from 28 Sep 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Build Search Shortcode for Essential Grid

You can use our Essential Grid to display your search results too.

Easiest way is to create or rebuild your theme’s search.php.

What you need are the resulting post IDs. You could use the usual loop to get them but we recommend building your own query which also gives you the possibility to define the post types in which you will search among several other options (check the codex: https://codex.wordpress.org/Class_Reference/WP_Query).

 

After building the appropiate Query you run through a custom loop that adds the post id to a pre defined array.

 

When finished with collecting all resulting post IDs you can include the following Essential Grid Shortcode. The posts parameter is filled with the array of IDs collected before, the alias is one grid you build for this purpose (here our example search default grid). Please remember that you need to select the categories and tags you might want to filter the posts with.