Memberlite refactor - Break down theme into smaller pieces and re-design mobile nav#215
Merged
kimcoleman merged 56 commits intostrangerstudios:memberlite-7-0from Feb 23, 2026
Conversation
…ng into components, added a customizer setting for footer style variation working on breaking down the header, a bit more tricky... still tinkering with the header, branch switch changed the theme mod name for the footer so we can use values to pull parts dynamically, updated the files so we can apply styles and switch template parts based on the footer theme mod formatting, branch switch
…mber info note, potentially remove ununsed functions remove sidebar 3 and meta nav from header
dial back the refactor for mobile, tackle separately, put mobile and site navigation near each other
… masthead on single post so we can include the title in the article tag styling tweak for blog archive, fixed loop I broke
…breadcrumbs, featured image, realized the content template and content single are pretty much the same, moved into one template while leaving conditionals in, updated function name to standards
…intend to deprecate
…g menus in the 'meta' location we're deprecating, separate template part for sidebar-3
… aria attrs and focus for mobile
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the Memberlite theme to break down monolithic template files into smaller, modular components and redesigns the mobile navigation system. The changes introduce a variation system for headers and footers, consolidate post display templates, and implement a new full-screen mobile navigation with improved accessibility features.
Changes:
- Refactored header and footer to use a variation-based template system for easier customization
- Consolidated multiple post format templates (audio, video, quote, link, image, status, single) into a single unified content.php template
- Redesigned mobile navigation with full-screen overlay, focus trapping using inert attribute, and smooth transitions
- Removed 'meta' menu location and post format support from theme features
- Added new helper functions for header/footer display logic with PHP 7.0+ type hints
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| style.css | Code formatting improvements, new mobile navigation styles with modern CSS features (color-mix, light-dark) |
| js/memberlite.js | Refactored to use IIFE pattern, new mobile nav with accessibility improvements using inert attribute |
| single.php | Simplified to use modular template parts and wrapped content in .row div |
| page.php | Simplified template structure, changed comment count comparison to strict equality |
| search.php | Wrapped content in .row div for consistency |
| index.php | Wrapped content in .row div, updated array access spacing |
| archive.php | Wrapped content in .row div |
| header.php | Major refactor to use variation system, removed inline header content |
| footer.php | Major refactor to use variation system |
| functions.php | Removed 'meta' menu location, removed post format support, updated sidebar-3 description |
| inc/template-tags.php | Added helper functions with PHP 7.0+ return type declarations |
| inc/extras.php | Renamed memberlite_getBreadcrumbs to memberlite_get_breadcrumbs |
| components/header/variation-default.php | New default header layout template |
| components/header/header-*.php | New modular header components (site navigation, mobile menu, member info, widget area, masthead, breadcrumbs) |
| components/footer/variation-default.php | New default footer layout template |
| components/footer/footer-*.php | New modular footer components (widgets, navigation, site info, back to top) |
| components/post/content.php | Unified template for all post formats and single posts |
| components/post/post-*.php | New modular post components (featured image, author block, nav, comments) |
| components/post/entry-*.php | Refactored entry components (header now uses h2 always, new entry-footer component) |
| components/post/content-*.php (deleted) | Removed format-specific templates (audio, video, quote, link, image, status, single) |
Comments suppressed due to low confidence (2)
components/header/header-member-info.php:46
- The condition for showing menu navigation has changed. Previously, the 'member' menu was shown when the user was logged in ($user_ID), and the 'member-logged-out' menu was shown otherwise. Now both menus are only shown based on memberlite_is_meta_login_active() AND $current_user->ID, which means the 'member-logged-out' menu will never be displayed. The else block at line 35 is unreachable because if memberlite_is_meta_login_active() is false or $current_user->ID is falsy, the entire meta-member div will still be rendered but the inner content won't execute either branch properly.
components/header/header-masthead.php:41 - The masthead has been changed from a
<header>element to a<div>element. This is a semantic HTML change that reduces accessibility. The header element provides better semantic structure and helps assistive technologies understand the page layout. Unless there's a specific reason for this change, it should remain a header element.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rlite into memberlite-refactor
…em; adjusting header right area spacing
… "widgets" for flex styling
…will do the minimum here
… in all cases regardless of setting
kimcoleman
approved these changes
Feb 23, 2026
RachelRVasquez
added a commit
to RachelRVasquez/memberlite
that referenced
this pull request
Mar 12, 2026
…ign mobile nav (strangerstudios#215) * bringing over some code from when we first experimented with separating into components, added a customizer setting for footer style variation working on breaking down the header, a bit more tricky... still tinkering with the header, branch switch changed the theme mod name for the footer so we can use values to pull parts dynamically, updated the files so we can apply styles and switch template parts based on the footer theme mod formatting, branch switch * putting back code that may have gotten lost during the rebase * cleaning up the main header.php, renamed the meta template part to member info note, potentially remove ununsed functions remove sidebar 3 and meta nav from header * remove where we register sidebar-3 and the meta menu dial back the refactor for mobile, tackle separately, put mobile and site navigation near each other * move row class into templates rather than a complex conditional, hide masthead on single post so we can include the title in the article tag styling tweak for blog archive, fixed loop I broke * pause here on cleaning up * started adding a header variation * re-named templates for variations for clarity, created new files for breadcrumbs, featured image, realized the content template and content single are pretty much the same, moved into one template while leaving conditionals in, updated function name to standards * delete content-single template, add note to format templates that we intend to deprecate * sidebars and spacing above content should be consistent now * put back sidebar-3 and any related code, added hook to detect existing menus in the 'meta' location we're deprecating, separate template part for sidebar-3 * mobile styles, almost there - updating the styling and JS for a close button * mobile header re-design done for the moment * adjust current background color using the light-dark function, adjust aria attrs and focus for mobile * delete post format templates * delete variation templates for now, will work on variations separately, small footer style tweak * type cast and comments on new functions in template-tags file * changes based on co-pilot feedback * ensure existing hooks for single content and post content are present * spaces * styling fixes to mobile menu with search form on and member meta showing * version update * more header tweaks * update php version * delete breadcrumbs template part and call function directly, add early return for author's block * Fixing incorrect template part include naming * Fallback for renamed breadcrumbs function * Fixing incorrect theme support duplicates; adding new inc/variations.php file for variaiton functions * USing new function to get variation template part and wrap in selector based on variation * Fixing update script to bypass a hidden site title * Adding template part version in code comments; various adjustments to template parts * Fixing default color to match current default scheme * Tweaking styles for simplicity and light/dark bgs * Styling and layout improvements further to cleanup * Tightening up scheme compare logic * Removing unused file * Simplifying styles; adjusting mobile menu spacing to use spacing system; adjusting header right area spacing * Consistent selectors on meta member list items; wrapping header right "widgets" for flex styling * Fixing up things from Claude deep review * Simplifying WC overrides - we are pulling back on support for WC and will do the minimum here * WPCS * Removing a call for post meta that isn't managed in this box anymore * Fixing code comment ref to number of menus * WPCS * Version bump for dev sites and upgrade script bump * Removing legacy support for IE no longer needed * Version bump for testing * Fixing template part PHP call * Removing legacy PHP version check with version bump * sticky nav better handling * Removing incorrect duplicate selectors on page titles * More consistency for shadows; adjustments needed to RTL * Fix to exit early if member info not set; fixes log out still showing in all cases regardless of setting * Tweak a color scheme * Fixing logged out member info in mobile menu --------- Co-authored-by: Kim Coleman <kim@strangerstudios.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
The goal of this PR is to prep for theme variations by breaking down our existing templates into smaller pieces. Get rid of redundant code, keep memberlite hooks intact if possible, and ensure the front-end is unaffected.
We've also decided to give the mobile menu a visual and accessibility face-lift in this branch.
How to test the changes in this Pull Request:
memberlite-7-0branch and this branch on the front-end. Keep an eye on thedebug.logfile with debug on.Other information:
Changelog entry