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.
Manage your content areas via Dashboard > Appearance > Content Areas.
Or, if viewing the front end of your site, use the quick links in the toolbar when logged in.
Put all of your content in a Group block to easily style background and text colors, and handle spacing/sizing via our layout and spacing settings.
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.
Before Header
The before header content area is great for utility menus, social icons, announcements, and any easily accessible content at the top of every page.
Header Left
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.
Header Right
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.
If you want a menu in Header Left or Right, don’t use content areas. It’s best to set your menu to the Header Left or Right menu location. Content Areas are useful when you want unique content instead of a menu.
Mobile Menu
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.
After Header
Show content after the header.
After Entry
Shows content after posts. Make sure you enable the display of this content area on your single content types.
Before Footer
Show content before the footer.
Footer
Display a footer.
Footer Credits
The footer credits content area defaults to standard site credits. Override or customize with anything you’d like.
Screenshots
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.