Overview
The VertiSub CMS WordPress theme follows a modular, organized architecture that separates concerns and promotes maintainability. The theme is built on WordPress best practices with a focus on custom post types, ACF integration, and page templates.Directory Structure
Core Architecture Files
functions.php
The main theme loader file that bootstraps all functionality:- Defines global constants (
VERTISUB_URL,VERTISUB_DIR) - Loads all module files from the
inc/directory - Registers custom post types from
inc/cpts/ - Initializes theme utilities and security features
Module Organization
The theme follows a modular approach with functionality separated into logical files:inc/setup.php
Handles WordPress theme setup and feature registration:inc/enqueue.php
Manages all CSS and JavaScript asset loading:inc/utils.php
Provides helper functions used throughout the theme:Template Hierarchy
The theme implements WordPress’s template hierarchy with custom page templates:Default Templates
- index.php - Fallback template for all content
- single.php - Individual post/CPT display with ACF gallery support
- header.php - Site header and navigation
- footer.php - Site footer and scripts
Custom Page Templates
Located intemplates/ directory, these provide specialized layouts:
home-template.php- Homepage with banner carousel, projects, and news sectionsservices-page.php- Dynamic service listing filtered by countrycourses-page.php- Course catalog with instructor relationshipscertifications-page.php- Certification showcaseabout-us-page.php- Company information and teamlocation-page.php- Interactive country/office mapnews-page.php- News and updates listing
Loading Strategy
Front-End Asset Loading
-
CSS Loading Order:
- Bootstrap 5.3.0 (CDN)
- AOS (Animate On Scroll)
- Google Fonts (Oswald)
- Font Awesome 6.4.0
- Theme style.css
-
JavaScript Loading:
- jQuery 3.3.1 + jQuery Migrate
- Bootstrap 5.3.0 Bundle (includes Popper)
- Various plugins (Owl Carousel, Magnific Popup, etc.)
- AOS animation library
- Theme script.js
Conditional Loading
Global Constants
Two main constants are available throughout the theme:Performance Considerations
Asset Optimization
File Modification Time for Cache Busting
The theme usesfilemtime() for automatic cache invalidation when files change.
Best Practices
1. Modular Organization
All functionality is separated into logical modules in theinc/ directory, making code easier to maintain and debug.
2. Separation of Concerns
- Custom post types isolated in
inc/cpts/ - Page templates in dedicated
templates/folder - Reusable components in
components/
3. WordPress Standards
- Proper use of WordPress hooks and filters
- Follows WordPress coding standards
- Uses translation-ready functions (though not fully implemented)
4. Security First
- Security module in
inc/security.php - Nonce verification for forms
- Input sanitization and output escaping
Related Documentation
- Custom Post Types - Detailed CPT documentation
- Template System - Page template usage
- ACF Integration - Advanced Custom Fields setup

