This section covers technical details for developers working with header and footer variation data programmatically.
Custom Post Type Details
| | Header | Footer |
|---|---|---|
| Post type | memberlite_header | memberlite_footer |
| Public | No (admin-only, not queryable on the frontend) | No (admin-only, not queryable on the frontend) |
| Block editor | Enabled (show_in_rest is true) | Enabled (show_in_rest is true) |
| Supports | Title, Editor, Revisions, Custom Fields | Title, Editor, Revisions, Custom Fields |
| Capabilities | All mapped to edit_theme_options | All mapped to edit_theme_options |
| Admin location | Memberlite > Headers | Memberlite > Footers |
Theme Mods
- Global header:
memberlite_default_header_slug— stores thepost_name(slug) of the assigned header variation, or'0'for the default header. - Global footer:
memberlite_default_footer_slug— stores thepost_nameof the assigned footer variation, or'0'for the default footer. - Location-specific footers: Stored as separate theme mods for each content type (blog/archives, single posts, pages).
Post Meta
- Per-page header override:
_memberlite_header_overrideon page posts — stores thepost_nameof the assigned header variation. - Per-page footer override:
_memberlite_footer_overrideon page posts — stores thepost_nameof the assigned footer variation. - Sticky header per-variation:
_memberlite_header_sticky(boolean) on thememberlite_headerpost itself.
Filter Hooks
memberlite_header_post_name: Filters the resolved header post_name before it is used.memberlite_footer_post_name: Filters the resolved footer post_name before it is used.
Cache
The list of header and footer variations is cached in transients (memberlite_header_variations and memberlite_footer_variations) for 12 hours. The cache is automatically cleared whenever a variation post is saved, trashed, or permanently deleted.
Cleanup on Deletion
When a variation post is permanently deleted, Memberlite automatically:
- Removes the relevant theme mod if it referenced the deleted post.
- Clears any per-page override meta values that referenced the deleted post.
This prevents orphaned assignments from leaving the Customizer dropdown or per-page settings pointing to a nonexistent variation.
Rendering
The memberlite_render_header_variation() and memberlite_render_footer_variation() functions look up the post by slug and render its block content via do_blocks(). If the post is not found or not published, they return false, and the theme falls back to the default header or footer template part.
Get Support From Our Team of Experts
For more help with this PMPro feature, check out our Support Page with three ways to get support as a free or premium member.
Last updated on June 25, 2026

