Content Areas (formerly Template Parts)
Versatile, block-powered content areas. Our block-based solution for Widget Areas.
Mai Theme uses Content Areas for global content areas that have traditionally been widget areas in most themes. This unlocks tremendous power for easy of laying out and styling your content.
Or, if viewing the front end of your site, use the quick links in the toolbar when logged in.
How To Use
- View Dashboard > Content Areas.
- Edit any content area and add whatever content you'd like.
- Save and view your site.
How Content Areas are displayed
Content Areas take advantage of post statuses.
- If a content area has content and is Published, it will display on the front end.
- If a content area has content and is Private, it will only display for users with the ability to edit posts (typically Editors/Administrators).
- If a content area has no content or is a Draft, it will not display.
Default Content Areas
Mai Theme has all of the following content areas available.
The before header content area is great for utility menus, social icons, announcements, and any easily accessible content at the top of every page.
The header left area is typically filled with a nav menu, but a content area can be used to put other content that requires blocks for easier management.
The header left area is typically filled with a nav menu, but a content area can be used to show text content, call to action (CTA’s), phone numbers, etc.
Using the mobile menu content area will completely override the content in the mobile menu. Make sure you add a
[mai_menu] shortcode or some sort of navigation along with your custom content. This area is great for adding a search bar, social icons, CTAs, etc.
Show content after the header.
Shows content after posts. Make sure you enable the display of this content area on your single content types.
Show content before the footer.
Display a footer.
The footer credits content area defaults to standard site credits. Override or customize with anything you’d like.
Custom Content Areas
You can use Mai Custom Content Areas plugin to create custom content areas and display them in various locations with different conditions. If you're comfortable with a little PHP code, you can register custom content areas via the config.php file in your theme.