A modern, ACF-powered WordPress theme designed for government benefits information websites.
Version: 2.0
- ACF-Driven Content β All content managed through Advanced Custom Fields
- Modular ACF Architecture β 18 field group files, each handling a specific feature
- LESS CSS Pipeline β Organized LESS partials compiled to a single minified
style.css - Section Toggles β Show/hide blog CTA and newsletter via Theme Settings
- Responsive Design β Mobile-first approach
- Custom Post Types β Glossary & Directory types included
- SEO Ready β Schema markup for FAQs, breadcrumbs
- Cloud Optimized β Works on Railway, AWS, or any cloud platform
- Reusable Partials β Newsletter, breadcrumbs, byline, etc. shared across templates
-
Clone into themes directory:
cd wp-content/themes/ git clone https://github.com/YOUR_USERNAME/one-theme.git one -
Activate in WordPress:
- Go to Appearance β Themes
- Activate "Ampry One"
- Download ZIP from GitHub
- WordPress Admin β Appearance β Themes β Add New β Upload
- Activate theme
Must Install:
- Advanced Custom Fields PRO (for all theme options)
Recommended:
- Yoast SEO (for better SEO)
- WP Mail SMTP (for form emails)
All theme settings are in WordPress Admin β Theme Settings:
- Primary colors (outputs CSS
:rootvariables) - Font families
- Button styles
- Site logo, favicon (via WordPress Customizer β Site Identity)
- Google Analytics & Facebook Pixel tracking codes
- Custom CSS injection
- Logo upload
- Top bar text
- CTA button
- Menu items
- Footer logo
- Footer columns (3 columns with links)
- Copyright text
- Social media links (Facebook, X, Instagram, YouTube, LinkedIn)
Toggle each section on/off:
- Hero Banner
- Perks (3 feature boxes)
- Get Started
- Featured Programs
- Mission Statement
- As Seen In
- Recent Articles
- Testimonials
- FAQ
- Newsletter
- Header β Eyebrow text, hero background image
- Visibility β Toggle CTA and Newsletter sections on/off
- Categories β Blog menu pill-link categories
- CTA β Title, description, button text/URL, background type (image or color), section background color
- Glossary Terms β For benefits glossary
- Directory β State-by-state directories
one/
βββ assets/
β βββ css/
β β βββ style.less # LESS entry point (imports all partials)
β β βββ style.css # Compiled & minified CSS
β β βββ _reset.less # CSS reset
β β βββ _mixins.less # LESS mixins (.rounded, .clearfix, etc.)
β β βββ _grid.less # Grid system
β β βββ _colors.less # Color variables (@grey-100, @grey-200, etc.)
β β βββ _typography.less # Font styles
β β βββ _base.less # Base element styles
β β βββ _responsive.less # Media queries
β β βββ sections/ # Section-specific styles
β β β βββ _header.less
β β β βββ _footer.less
β β β βββ _breadcrumbs.less
β β β βββ _article-header.less
β β β βββ _article.less
β β β βββ _category-header.less
β β βββ pages/ # Page-specific styles
β β βββ _front-page.less
β β βββ _about.less
β β βββ _how-it-works.less
β β βββ _blog.less
β β βββ _category.less
β βββ js/
β β βββ app.js # Theme JS
β βββ images/ # Default images
βββ inc/
β βββ auto-update.php # Theme updates
β βββ setup-pages.php # Page creation & CPT registration
β βββ ajax-handlers.php # AJAX functions
β βββ settings/ # ACF settings (modular architecture)
β βββ options-pages.php # Options page registration
β βββ defaults.php # Default ACF values on activation
β βββ css-output.php # :root CSS variable generation
β βββ head-output.php # Analytics, pixels, custom CSS
β βββ helpers.php # Utility functions
β βββ field-groups/ # One file per feature
β βββ about.php
β βββ banner.php
β βββ blog.php
β βββ category.php
β βββ colors.php
β βββ directory.php
β βββ faqs.php
β βββ featured-post.php
β βββ footer.php
β βββ front-page.php
β βββ how-it-works.php
β βββ identity.php
β βββ navigation.php
β βββ page.php
β βββ reviewer.php
β βββ survey.php
β βββ typography.php
β βββ user.php
βββ templates/ # Custom page templates
β βββ about.php
β βββ blog.php
β βββ how-it-works.php
β βββ survey.php
β βββ glossary.php
βββ template-parts/
β βββ components/ # Reusable UI components
β β βββ article.php
β β βββ article-header.php
β β βββ breadcrumbs.php
β β βββ byline.php
β β βββ category-header.php
β β βββ featured-image.php
β βββ sections/ # Page sections & layouts
β βββ nav.php
β βββ page-header.php
β βββ page-menu.php
β βββ sidebar-widgets.php
β βββ blog-header.php
β βββ blog-menu.php
β βββ newsletter.php
β βββ author-header.php
β βββ single-post.php
β βββ map.php
βββ acf-json/ # ACF JSON (Directory post type fields)
βββ front-page.php # Homepage template
βββ single.php # Single post
βββ page.php # Generic page
βββ 404.php # 404 page
βββ index.php # Fallback archive
βββ category.php # Category archive
βββ author.php # Author archive
βββ archive-directory.php # Directory archive
βββ archive-glossary.php # Glossary archive
βββ single-directory.php # Single directory entry
βββ single-glossary.php # Single glossary term
βββ functions.php # Theme functions
βββ header.php # Site header
βββ footer.php # Site footer
βββ style.css # Theme info (WP metadata)
βββ package.json # LESS build scripts
The theme uses LESS as a CSS preprocessor. The compiled style.css is committed to the repo (there is no CI/CD build step), so you must compile locally after any .less changes.
cd one-theme-repo
npm installThis installs less and nodemon as dev dependencies.
# One-time build (minified)
npm run build:css
# Watch mode (auto-recompiles on any .less file change)
npm run watch:cssBoth commands run:
lessc --compress assets/css/style.less assets/css/style.css
- Entry point:
assets/css/style.lessβ imports all partials in order - Partials are prefixed with
_(e.g.,_header.less) and are never compiled on their own - Import order matters: reset β mixins β grid β colors β typography β base β sections β pages β responsive
- Variables & mixins go in
_colors.lessand_mixins.less
- Create the file in the appropriate folder:
assets/css/sections/_my-section.lessfor section stylesassets/css/pages/_my-page.lessfor page-specific styles
- Add the import to
assets/css/style.less:@import "sections/_my-section";
- Run
npm run build:cssto compile - Commit both the
.lessfile and the updatedstyle.css
v2.0 uses a modular architecture β field groups are split into individual files under inc/settings/field-groups/. The loader in functions.php auto-includes all PHP files in that directory.
| File | Purpose |
|---|---|
inc/settings/options-pages.php |
Registers all ACF options pages and sub-pages |
inc/settings/defaults.php |
Populates default ACF values on theme activation |
inc/settings/css-output.php |
Generates :root CSS variables from color/typography settings |
inc/settings/head-output.php |
Outputs analytics, pixels, custom CSS to <head> |
inc/settings/helpers.php |
Utility functions used across settings |
inc/settings/field-groups/*.php |
One file per feature (blog, footer, colors, etc.) |
Each file in field-groups/ follows this pattern:
<?php
add_action('acf/init', 'one_register_FEATURE_fields');
function one_register_FEATURE_fields() {
if (!function_exists('acf_add_local_field_group')) return;
acf_add_local_field_group(array(
'key' => 'group_FEATURE',
'title' => 'Feature Name',
'fields' => array( /* ... */ ),
'location' => array(
array(
array(
'param' => 'options_page',
'operator' => '==',
'value' => 'theme-settings',
),
),
),
));
}- Create
inc/settings/field-groups/my-feature.php - Follow the pattern above β use a unique
group_key andfield_prefixed field keys - The file is auto-loaded by
functions.phpβ no manual include needed - Target the appropriate options page slug in the
locationarray
| Page | Slug |
|---|---|
| Theme Settings (main) | theme-settings |
| Colors | acf-options-colors |
| Typography | acf-options-typography |
| Home Banner | acf-options-home-banner |
| Front Page Content | acf-options-front-page-content |
| Footer | acf-options-footer |
| About Page | acf-options-about-page |
| How It Works | acf-options-how-it-works |
| Navigation | acf-options-navigation |
The theme uses a hybrid ACF strategy:
- PHP-registered fields (
field-groups/*.php) β for all theme settings. These are version-controlled and portable. - ACF JSON (
acf-json/) β only for the Directory custom post type fields. These sync via ACF's built-in JSON sync.
// Options page fields β always pass 'option'
$value = get_field('field_name', 'option') ?: 'Fallback';
// Per-post fields β no second argument needed
$value = get_field('field_name');Always provide a fallback with ?: in case the field hasn't been saved yet.
Default: "Ampry One". Update in:
style.cssβ Theme Name headerfront-page.phpβ Mission text & FAQ answers- ACF Options (if values were already saved)
Replace images in assets/images/:
shield.pngβ Hero stat iconedit_square.pngβ Get Started iconstar.png,forum.png,thumb_up.pngβ Perk iconsveteran.png,ssdi.png,grants.pngβ Program iconsblog-header-bg.webpβ Blog header heroblog-cta-bg.webpβ Blog CTA default background
Use the built-in WordPress Site Icon: Appearance β Customize β Site Identity β Site Icon
This theme is optimized for Railway deployment:
- Push theme to GitHub
- Update WordPress Dockerfile to clone theme:
RUN cd wp-content/themes && \ git clone https://github.com/YOUR_USERNAME/one-theme.git one - Deploy to Railway
- Configure ACF Options in WordPress admin
See railway-wordpress/ in the project root for Docker and Railway config files.
Issue: ACF fields not showing
- Install ACF PRO plugin
- Fields are auto-registered via PHP β no import needed
Issue: Default images not loading
- Check
assets/images/folder exists - Verify file paths in templates
Issue: Custom Post Types not appearing
- Go to Settings β Permalinks
- Click "Save Changes" to flush rewrite rules
Issue: CSS changes not reflecting
- Run
npm run build:cssafter editing any.lessfile - Hard refresh browser (Ctrl+Shift+R)
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Icons: Material Design Icons
- Fonts: Google Fonts (Inter, Roboto Serif)
- Maps: Custom SVG US map
This is proprietary software. All rights reserved. Unauthorized copying, distribution, or modification of this code is strictly prohibited.
- Modular ACF Architecture β Split monolithic
theme-settings.phpinto 18 individual field group files underinc/settings/field-groups/ - LESS CSS Pipeline β Consolidated all CSS into organized LESS partials with
--compressminification - Blog Page Overhaul β Customizable eyebrow text, hero image, CTA (background type/color/image), newsletter toggle, menu categories via ACF
- Reusable Newsletter Partial β Shared across front page, blog, and category pages
- Full Hardcoded Audit β Replaced ~75 hardcoded values with ACF fields or sensible defaults
- Orphan Cleanup β Removed 7 unused files, fixed duplicate field name collisions
- Social Links in Footer β Facebook, X, Instagram, YouTube, LinkedIn from ACF
- Head Output β Google Analytics, Facebook Pixel, custom CSS injection
- Favicon β Uses WordPress built-in Site Icon (removed custom ACF field)
- CSS Variables β Dynamic
:rootcolor/typography variables from ACF settings - Nav Styling Fix β Active menu item highlight
- 404 Console Error Fix β Removed broken JS reference
- Added section visibility toggles
- Improved Railway compatibility
- Enhanced ACF defaults
- Fixed image fallbacks
- Initial release