Table of Contents[Hide][Show]
Mai Post Grid walk-through video
Mai Term Grid walk-through video
All Mai Grid blocks have the same tabs of settings. The only difference between each is the “Entries” tab, which is the “query” used to pull in the entries you want to display in the grid.
Display & Layout
The Display settings are for choosing which entry elements should display, in what order they should display, and the display of the elements inside each entry.
The Layout settings are for setting the layout of the actual entries in the container/row(s); including the amount of columns, the alignment of the columns, and the gap/gutter between the entries.
Mai Post Grid – Entries
By default, Mai Post Grid is set to show 12 recent posts, similar to a regular blog, where the are ordered newest to oldest. Our custom block gives you nearly endless possibilities of which entries to display. We’ll break it down below.
Post Type
Display entries from one or more post types, including any public or publicly_queryable custom post types.
Get Entries By
This setting tells the query “how” to get the entries.
Default Query
The default query just gets all entries, and the Order and Order By settings determine what will display.
Choice
Getting entries by Choice will display a Choose Entries field where you can choose specific entries to display.
Taxonomy/Meta
Getting entries by Taxonomy or Post Meta allows you to get entries in (or not in) a specific category, tag, custom taxonomy term, or with/without specific post meta values.
You can build multiple conditions/rules, which makes Mai Grid blocks some of the most powerful blocks available.
Taxonomies Relation
This setting determines the relation between 2 or more conditions. In the example above, having a taxonomy relation of And means, “in the Recipes category AND ALSO not tagged Dairy Free”.
Change this to Or would mean, “in the Recipes category OR tagged Dairy Free”.
Parent
The parent setting is great for hierarchical post types like Pages. You can set the parent page and show only child pages of itself. Or, you can check the box to “Show children of current entry” to do just that, show child pages of the page you are currently on.
Number of Entries
The number of entries to display in the grid. Default is typically 12. Use 0 (zero) to show all.
Offset
The number of entries to skip. Example: If you are getting the 12 most recent posts, setting the offset to 2 will mean, “get the 12 most recent posts, skipping the 2 most recent”. Or in other words, “get the 12 most recent posts, starting from the 3rd.
Order By
Order the entries by different options.
- Title – Alphabetically by the entry title.
- Slug – Alphabetically by the entry slug/permalink.
- Date – The entry date.
- Modified – The entry’s last modified date.
- Random – Shows random entries every page load (the “random” query may be disabled on some hosts).
- Comment Count – The amount of comments each entry has.
- Menu Order – The order in the main entry list in the back end. Works really well with Simple Page Ordering plugin.
- Meta Value Number – (Advanced!) Order by numeric meta value. When using this option, you must put in a meta key to order values by. This is great for ordering posts by total social shares via Shared Counts plugin, using
shared_counts_total
meta key.
Order
Whether the Order By setting should display Ascending or Descending entries.
Exclude Entries
Exclude specific entries from being displayed. This setting allows you to use all the other settings to get the entries you want, then easily exclude one ore more specific entries.
Exclude
Exclude Displayed
Exclude entries that are already displayed by other instances of Mai Grid blocks. Imagine you have a “Recent Posts” section on your homepage showing the latest 6 posts. Lower in the page you may have a “Featured Posts” or “Latest Recipes” section. If you want to easily make sure no posts from the “Recent Posts” section display in these sections, just check this “Exclude displayed” box.
Exclude Current
Exclude the current page/post/entry from being displayed in the grid. This is useful when using Mai Post Grid in the After Entry widget area. Checking the “Exclude current” box makes sure the grid never shows the actual post you are on inside of the grid.
Mai Term Grid – Entries
By default, Mai Term Grid is set to show 12 recent categories, where the are ordered newest to oldest. Our custom block gives you nearly endless possibilities of which entries to display. We’ll break it down below.
Taxonomy
Display entries from one or more taxonomy including categories, tags, and any public custom taxonomies.
Get Entries By
This setting tells the query “how” to get the entries.
Taxonomy
The default query just gets all entries, and the Order and Order By settings determine what will display.
Choice
Getting entries by Choice will display a Choose Entries field where you can choose specific entries to display.
Parent
The parent setting is great for hierarchical taxonomies like Categories. You can set the parent category/term and show only child terms of itself. Or, you can check the box to “Show children of current entry” to do just that, show child pages of the page you are currently on.
Number of Entries
The number of entries to display in the grid. Default is typically 12. Use 0 (zero) to show all.
Offset
The number of entries to skip. Example: If you are getting the 12 most recent categories, setting the offset to 2 will mean, “get the 12 most recent categories, skipping the 2 most recent”. Or in other words, “get the 12 most recent categories, starting from the 3rd.
Order By
Order the entries by different options.
- Title – Alphabetically by the entry title.
- Slug – Alphabetically by the entry slug/permalink.
- Entry Totals – The total amount of entries each category/term has assigned to it.
- Term ID – Number order by the term ID stored in the database.
Order
Whether the Order By setting should display Ascending or Descending entries.
Exclude Entries
Exclude specific entries from being displayed. This setting allows you to use all the other settings to get the entries you want, then easily exclude one ore more specific entries.
Exclude
Exclude terms with no posts
Exclude categories/terms that do not have any posts/entries assigned to them. This would prevent someone clicking to go to a term archive that is empty.
Exclude Displayed
Exclude entries that are already displayed by other instances of Mai Grid blocks.
Exclude Current
Exclude the current term from being displayed in the grid. This is useful when using Mai Term Grid in the archive intro text of a category (via Reusable Blocks and [mai_content]
shortcode). Checking the “Exclude current” box makes sure the grid never shows the actual term you are on inside of the grid.