Automatically Select all Current and Future Categories

The following code snippets can be used to auto-generate grid's that always include all posts, pages and/or custom post types.

In order for this to work, first create a grid from within the plugin’s main admin.  This will essentially be used as a “settings grid”, where the settings from the grid will be used, but the actual post source of the grid will be auto-generated via PHP.

Next, decide where you’re going to add the PHP code.  This will depend on where you want the grid to show up on any given one of your web pages.  As a proof of concept, you can switch to the TwentyFifteen theme, and then add the code to the very bottom of TwentyFifteen’s “header.php” file.

Auto-include all posts:

Auto-include all pages:

Auto-include all entries from a specific Custom Post Type:

Auto-include all posts, pages and custom post-types:

Example where Grid is only added to a specific page within your site: