• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
  • Main Site
  • About Us
  • Services
  • Support
  • Blog
BizBudding Docs

BizBudding Docs

Documentation

  • Mai Theme Docs
    • Mai Themes (v2)
  • Classic Theme Docs
    • Pretty Darn Cute
    • SEO Themes
    • Mai Theme (Classic)
  • Search
Home » MT Docs » Blocks » Mai Post/Term Grid Blocks

Mai Post/Term Grid Blocks

Knowledgebase: Blocks

An extremely powerful set of blocks to display a grid of post or term entries in various layouts.

Table of Contents[Hide][Show]
  • Mai Post Grid walk-through video
  • Mai Term Grid walk-through video
  • Display & Layout
  • Mai Post Grid - Entries+−
    • Post Type
    • Get Entries By
    • Number of Entries
    • Offset
    • Order By
    • Order
    • Exclude Entries
    • Exclude
  • Mai Term Grid - Entries+−
    • Taxonomy
    • Get Entries By
    • Number of Entries
    • Offset
    • Order By
    • Order
    • Exclude Entries
    • Exclude

Mai Post Grid walk-through video

Mai Term Grid walk-through video

Mai Post Grid block example
Mai Post Grid block example
Mai Term Grid block example
Mai Term Grid block example

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 Grid blocks share nearly identical settings and functionality with the theme Content Archive settings in the Customizer. For a description of the available settings, see the Content Archives article in our docs.

Mai Post Grid Display tab

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.

All of the settings in this tab give a UI to create a query that gets used by WP_Query.

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.

This example shows how to get posts that are IN the Recipes category and NOT tagged Dairy Free.
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.

The Parent settings is great for Services, Practice Areas, Our Team, etc. pages.

  1. Create a WordPress Page called “Services” (or whatever you want it to be) if you don’t already have one.
  2. Create a child page for each service by setting the “Services” page as the parent page via the Page Attributes metabox in the sidebar when creating/editing each page.
  3. Add a Mai Post Grid block to the Services page.
  4. Set “Get Entries By” to “Parent”.
  5. Check the box to “Show children of current entry”, or choose the “Services” page as the Parent page to display children of.

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.

The offset setting is most useful when you have multiple grid blocks on the same page, for the goal of different layouts. You can use 2 Mai Grid blocks in a Columns block. The left can show your most recent post really big, filling the full column, then the right column can show a list of 4-6 of recent posts. Set the offset to 1 so it “skips” the one already displayed via the first column.

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.

If you want to exclude a lot of entries, you should consider getting entries by “Taxonomy/Meta” and excluding by tag, category, or custom taxonomy.

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.

All of the settings in this tab give a UI to create a query that gets used by WP_Tax_Query.

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.

The Parent settings is great for Recipes, Travel Locations, etc.

  1. Create a WordPress Category called “Recipes” (or whatever you want it to be) if you don’t already have one.
  2. Create a child category for each recipe (like Entries, Appetizers, Sides, etc) by setting the “Recipes” category as the parent via the Parent Category select field when creating/editing each category.
  3. Add a Mai Term Grid block to the any page.
  4. Set “Get Entries By” to “Parent”.
  5. Choose the “Recipes” category as the Parent category to display children of.

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.

Next Post: Mai Icon Block »
bizbudding team

Need some help with your theme?

Open a support request by filling out our support form.

Get Support

Sidebar

Knowledgebase

First Steps

Menus

Content Areas

Customizer

Blocks

Shortcodes

Advanced/Developers

Plugins




BizBudding icon

Resources

  • Shop
  • Affiliates
  • Data Protection
  • Privacy Policy
  • Terms & Conditions
  • Contact Us

quick links

  • Main Site
  • About Us
  • Services
  • Support
  • Blog

Contact Details

1001 County Road 517, Suite 1
Hackettstown, NJ 07840

(877) 548-2440

Contact Us


  • Mai Theme Docs
    • Mai Themes (v2)
  • Classic Theme Docs
    • Pretty Darn Cute
    • SEO Themes
    • Mai Theme (Classic)
  • Search

Copyright © 2010–2021 BizBudding Inc. · All Rights Reserved ♥ Work hard and be nice to people.