Theme Overview
Documentation for the custom Hello Elementor child theme powering TenPoint Crossbows.
Theme Details
Name: Hello Elementor (Child Theme)
Base: Hello Elementor v2.2.0
Status: Heavily customized with Rhino Group modules
Location: wp-content/themes/elementor/
Key Features
Elementor Integration
- Full Elementor Pro theme builder support
- Custom body classes for CSS targeting:
suma-ct-{document_slug} - Font display optimization: 'swap' for Google Fonts
- Removes Font Awesome & Eicons to reduce bloat
- All core Elementor locations registered
WooCommerce Customizations
Located in: inc/class-woocommerce.php
Product Features:
- Custom product image handling via
<picture>elements - Responsive images with rear view support (crossbow-specific)
- Product variations with custom pricing and SKU fields
- Custom related products rendering
- Back-in-stock button integration
- Product schema markup
Checkout & Orders:
- Custom checkout validation (prevents email in street address)
- Gift card support
- Custom order statuses:
wc-awaiting-shipmentwc-invoicedwc-partially-shipped
- Payment method filtering in admin
- Exported status column integration
Admin Columns:
- "Exported to Epicor" status
- Payment method filtering
- Custom product columns
Specialized Modules
Located in: inc/
| Module | File | Purpose |
|---|---|---|
| Admin | class-admin.php | Theme settings options page, cache clearing, admin bar customization |
| Product Content | class-product-content.php | Product listing customization, schema markup, Bazaar Voice integration |
| Bazaar Voice | class-bazaar-voice.php | Reviews & ratings sync, REST API (/bv/v1/statistics-update) |
| Recall Checker | class-recall.php | Serial number validation against recall database |
| Gravity Forms | class-gravity-forms.php | Default field values, warranty registration validation |
| FacetWP | class-facetwp.php | Category name mapping for facet display |
| Algolia | class-algolia.php + class-algolia-custom-search.php | InstantSearch integration |
| Elementor Blocks | class-elementor-blocks.php | Custom widget registration |
| Frontend Assets | class-frontend.php | CSS/JS enqueue management |
| PayTomorrow | class-custom-paytomorrow.php | Financing widget customization |
| Dealer Locator | class-dealer-locator.php | Dealer search integration |
| Elite Warranty | class-elite-warranty.php | Warranty product handling |
| Rate Limiter | class-rate-limiter.php | API request rate limiting |
| Regulations | class-regulations.php | Compliance messaging |
| Theme Orchestrator | class-theme.php | Bootstrap entire theme system |
File Structure
wp-content/themes/elementor/
├── functions.php # Theme entry point
├── style.css # Theme stylesheet header
├── style.min.css # Minified styles
├── theme.css # Compiled theme styles
├── theme.min.css # Minified theme styles
├── editor-style.css # Block editor styles
├── inc/ # Custom modules
│ ├── class-theme.php # Main orchestrator
│ ├── class-admin.php
│ ├── class-woocommerce.php
│ ├── class-product-content.php
│ ├── class-bazaar-voice.php
│ ├── class-recall.php
│ ├── class-gravity-forms.php
│ ├── class-facetwp.php
│ ├── class-algolia.php
│ ├── class-elementor.php
│ ├── class-frontend.php
│ └── [other modules...]
├── suma-utils/
│ └── init.php # Theme bootstrap
├── assets/
│ ├── css/
│ │ └── custom.css # Custom CSS (v2.0.6)
│ ├── js/
│ │ └── bundle.js # Compiled JS (v2.3.5)
│ └── images/
├── templates/ # Custom templates
├── api.php # AJAX endpoint
├── webpack.mix.js # Laravel Mix config
├── gulpfile.js # Gulp build tasks
└── mix-manifest.json # Asset versioning
Frontend Assets
JavaScript Libraries (CDN)
- jQuery 2.2.4
- Swiper (latest)
- Fancybox 3.5.7 (for video library)
- Picturefill 3.0.3 (responsive images polyfill)
Theme Assets
- CSS:
assets/css/custom.css(v2.0.6) - JS:
assets/js/bundle.js(v2.3.5) - Algolia: Conditional load on page 6832
- Warranty Page: Dequeues eBiz billing script on page 4550
Localized JavaScript
elementorRest = {
nonce: 'wp_rest_nonce_value',
root: '/wp-json/'
};
Custom REST Endpoints
Bazaar Voice Statistics Update
Endpoint: POST /wp-json/bv/v1/statistics-update
Auth: Nonce-based
Purpose: Update product review statistics from Bazaar Voice API
Process:
- Batch processes 100 products at a time
- Queries Bazaar Voice API for review stats
- Updates product meta:
bazaarvoice_review_countbazaarvoice_average_ratingbazaarvoice_last_review_date
- Rate limiting via
bazaarvoice_last_updatemeta
Custom AJAX Endpoints
Location: /api.php
Query Parameter: ?action={action_name}
| Action | Purpose |
|---|---|
check_serial_number | Validate serial against recall database |
current_cart_count | Get current cart item count |
check_selection | Product selection validation |
Custom Database Tables
Serial Numbers
Table: wp_serial_numbers
| Column | Type | Purpose |
|---|---|---|
id | BIGINT | Primary key |
serial_number | VARCHAR(255) | Serial number |
product_id | BIGINT | WooCommerce product ID |
order_id | BIGINT | WooCommerce order ID |
registered_at | DATETIME | Registration timestamp |
Recalled Serial Numbers
Table: wp_serial_numbers_recalled
| Column | Type | Purpose |
|---|---|---|
id | BIGINT | Primary key |
serial_number | VARCHAR(255) | Recalled serial number |
recall_date | DATE | Date of recall |
reason | TEXT | Recall reason |
Theme Hooks
WordPress Core Hooks
| Hook | Priority | Callback | Purpose |
|---|---|---|---|
wp_enqueue_scripts | 10 | Frontend::enqueue_assets() | Queue CSS/JS |
wp_enqueue_scripts | 20 | Theme::dequeue_wc_styles() | Remove WC default CSS |
after_setup_theme | 10 | Theme::theme_support() | Register theme features |
init | 10 | Theme::register_menus() | Register navigation menus |
WooCommerce Hooks
Product Display:
woocommerce_before_add_to_cart_formwoocommerce_single_product_summarywoocommerce_after_single_product_summarywoocommerce_product_options_pricingwoocommerce_variation_options_pricingwoocommerce_product_options_advancedwoocommerce_product_options_sku
Checkout & Orders:
woocommerce_checkout_process(validation)woocommerce_order_status_changedwoocommerce_payment_completewoocommerce_thankyou
Admin:
manage_shop_order_posts_custom_columnmanage_product_posts_custom_columnrestrict_manage_posts(order filtering)
Elementor Hooks
elementor/theme/register_locations→ Register theme builder locationselementor/frontend/after_enqueue_styles→ Remove Font Awesomeelementor/widgets/widgets_registered→ Register custom widgets
Theme Support
Registered features:
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
add_theme_support('align-wide');
add_theme_support('post-formats', ['aside', 'gallery', 'video']);
add_theme_support('woocommerce');
add_theme_support('wc-product-gallery-zoom');
add_theme_support('wc-product-gallery-lightbox');
add_theme_support('wc-product-gallery-slider');
Navigation Menus
Registered Locations:
primary-menu— Primary navigation
ACF Options Pages
Created via ACF Pro:
Theme Settings:
- Location: Settings → Theme Settings
- Fields: Global theme options, API keys, feature toggles
Bans Control Panel:
- Location: Settings → Bans CP
- Fields: Banned IP addresses, user management
Build Process
Laravel Mix (webpack.mix.js)
mix.js('src/js/app.js', 'assets/js/bundle.js')
.sass('src/scss/theme.scss', 'assets/css/custom.css')
.version();
Gulp Tasks
- CSS compilation: SCSS → CSS
- JS bundling: ES6 modules → bundle.js
- Image optimization: Compress images
- Watch mode: Auto-recompile on file changes
Build Commands
# Development
npm run dev
# Production (minified)
npm run production
# Watch mode
npm run watch
# Gulp tasks
gulp
gulp watch
Performance Optimizations
Asset Loading
- Dequeue unnecessary WooCommerce CSS/JS
- CDN assets for common libraries
- Conditional script loading (Algolia, PayTomorrow)
- Asset versioning via mix-manifest.json
Image Handling
- Responsive images via
<picture>elements - Lazy loading with Picturefill
- WebP format support (if server configured)
- Rear image support for crossbow products
Caching
- Transient caching for Bazaar Voice data
- Database query caching
- Object cache compatibility (Redis/Memcached)
Customization Examples
Adding a New Theme Module
-
Create module class in
inc/:// inc/class-my-module.php
namespace SumaTheme;
class MyModule {
public function __construct() {
add_action('init', [$this, 'init']);
}
public function init() {
// Module initialization
}
} -
Load module in
inc/class-theme.php:new \SumaTheme\MyModule();
Custom WooCommerce Hook
Add to inc/class-woocommerce.php:
add_action('woocommerce_before_single_product', [$this, 'custom_product_message']);
public function custom_product_message() {
echo '<div class="custom-message">Special offer!</div>';
}
Custom Elementor Widget
Add to inc/class-elementor-blocks.php:
public function register_custom_widgets($widgets_manager) {
require_once __DIR__ . '/widgets/my-widget.php';
$widgets_manager->register_widget_type(new \SumaTheme\Widgets\My_Widget());
}
Troubleshooting
Styles Not Loading
- Clear Elementor cache: Elementor → Tools → Regenerate CSS
- Rebuild assets:
npm run production - Check file permissions
- Verify asset paths in mix-manifest.json
JavaScript Errors
- Check browser console
- Verify jQuery loaded before custom scripts
- Clear browser cache
- Check for plugin conflicts
WooCommerce Display Issues
- Regenerate product thumbnails
- Clear WooCommerce transients
- Check WooCommerce system status
- Review theme support declarations