Theme structure
The active theme is smith-sons-1 at wp/site/wp-content/themes/smith-sons-1. The live style.css, package.json, and Composer metadata all report version 2.1.0.
This page was re-verified against the theme files on 30 July 2026. functions.php is the source of truth for active PHP modules.
Active bootstrap
functions.php loads these modules in this order:
inc/setup.php
inc/sidebars.php
inc/assets.php
inc/performance.php
inc/elementor/icons.php
inc/navigation/class-smith-sons-bootstrap-nav-walker.php
inc/navigation.php
inc/template-tags/header.php
inc/account/authentication.php
inc/customizer/woocommerce-settings.php
inc/customizer/footer-settings.php
inc/customizer/integrations.php
inc/template-tags/footer.php
inc/customizer/product-contact.php
inc/media.php
inc/woocommerce/template-hooks.php
inc/woocommerce/cart.php
inc/woocommerce/catalog-filters.php
inc/woocommerce/catalog.php
inc/woocommerce/images.php
inc/woocommerce/product-search.php
inc/woocommerce/product-gallery.php
inc/woocommerce/product-video-admin.php
inc/woocommerce/auctions.php
inc/search/legacy-ajax-search.php
inc/shortcodes/inner-page-hero.php
inc/elementor/bootstrap.php
Load order matters. A module may call a function or attach to a hook registered by an earlier module.
Root files
| File or directory | Responsibility |
|---|---|
functions.php |
Version constant, safe module loader, runtime dependency list |
style.css |
WordPress theme metadata, version, and legacy/base styles |
theme.json |
Block-editor/theme design settings |
header.php |
Global document head and site header entry |
footer.php |
Global footer and closing markup |
page.php |
Standard WordPress pages |
single.php |
Single posts/content |
index.php |
Template fallback |
search.php |
Search results |
404.php |
Not-found page |
sidebar.php |
Default sidebar output |
comments.php |
Comment list and form |
template-parts/ |
Reusable account, content, header, footer, and WooCommerce fragments |
assets/ |
Source CSS/JS, built gallery assets, images, and bundled frontend libraries |
woocommerce/ |
Six retained WooCommerce template overrides |
inc/ |
Functional modules loaded by functions.php |
languages/ |
Translation files |
docs/ |
Theme engineering notes; useful context, not runtime code |
vendor/, node_modules/ |
Installed linting and asset-build dependencies; do not hand-edit |
Module responsibilities
| Area | Active files | What they do |
|---|---|---|
| Foundation | inc/setup.php, inc/sidebars.php |
Theme support, menus, image sizes, widget areas |
| Assets | inc/assets.php, inc/performance.php, inc/media.php |
Enqueues, loading policy, media behavior |
| Navigation/header/footer | inc/navigation.php, inc/template-tags/* |
Menu walkers and shared presentation helpers |
| Customizer | inc/customizer/* |
WooCommerce, footer, integrations, and product-contact settings |
| Accounts | inc/account/authentication.php |
Login/account behavior |
| Elementor | inc/elementor/bootstrap.php, inc/elementor/icons.php |
Widget/category bootstrap and icon support |
| WooCommerce | inc/woocommerce/* |
Hooks, cart, catalog, search, images, gallery, video, auctions |
| Search | inc/search/legacy-ajax-search.php |
Legacy AJAX search endpoint/compatibility |
| Shortcodes | inc/shortcodes/inner-page-hero.php |
Inner-page hero shortcode |
Registered theme features
inc/setup.php currently registers:
- automatic feed links;
- dynamic title tags;
- post thumbnails;
- WooCommerce support;
- flexible custom logos;
- HTML5 output;
- translation loading from
languages/; - image sizes
custom-thumbnail(200×150),shop-auction(500×400), andwoocommerce_shop(300×400).
The four persisted menu locations are:
| ID | Admin label |
|---|---|
primary |
Primary Menu |
footer |
Footer Menu |
main-menu |
Legacy Main Menu |
footer-menu-last |
Bottom Footer Menu |
Do not rename these IDs without migrating saved menu assignments.
Widget areas
inc/sidebars.php registers nine widget areas:
sidebar-1;footer-widget-area-1throughfooter-widget-area-5;shop-sidebar;woocommerce-sidebar;search-sidebar.
The WooCommerce and Search sidebars are retained as legacy storage for rollback. Current catalogue filtering and product search are theme-owned.
Template parts
The current reusable fragments are grouped as follows:
| Directory | Current contents |
|---|---|
template-parts/header/ |
Site header, mobile navigation, account navigation, product search |
template-parts/footer/ |
Signup, widget columns, bottom footer |
template-parts/account/ |
Authentication dialog |
template-parts/content/ |
Default, page, single, and empty-content output |
template-parts/woocommerce/ |
Catalogue filters, product categories, live auctions |
Elementor widgets
inc/elementor/bootstrap.php loads the shared widget base and registers eleven theme widgets after Elementor initializes:
- Benefits List;
- Collection Carousel;
- Curation Process Overview;
- Curation Process Steps;
- FAQ;
- Featured Hero;
- Mineral Collection Intro;
- Online Auctions Promo;
- Our Story;
- Owner Profile;
- Product Grid.
inc/elementor/icons.php adds the locally hosted Boxicons regular, solid, and logo collections to Elementor’s icon picker.
Frontend assets
inc/assets.php is the asset registry and conditional enqueue layer.
| Asset group | Current source |
|---|---|
| Typography | Google Fonts: DM Sans and Playfair Display |
| Framework | Local Bootstrap CSS/JS and local Popper |
| Icons | Local Boxicons CSS, fonts, and Elementor JSON indexes |
| Theme CSS | style.css, assets/css/site.css, header, WooCommerce, responsive, account, and Bootstrap override styles |
| Theme JavaScript | Header, search, storefront, filters, auctions, authentication, and legacy search modules |
| Product gallery | Built assets/dist/product-gallery.min.* plus local PhotoSwipe |
| Source gallery files | assets/src/product-gallery.mjs and assets/src/product-gallery.css |
Asset versions use file modification times when available, falling back to SMITH_SONS_VERSION.
WooCommerce overrides
The current woocommerce/ directory contains six overrides:
woocommerce/archive-product.php
woocommerce/content-product.php
woocommerce/content-single-product.php
woocommerce/global/breadcrumb.php
woocommerce/single-product/product-image.php
woocommerce/single-product/related.php
Much of the integration is deliberately implemented through hooks and template-parts/woocommerce/ rather than additional overrides.
Template ownership
Use hooks or template parts for small changes. Edit a root template only when the page shell itself must change. For WooCommerce, first determine whether behavior comes from:
- an action/filter in
inc/woocommerce/; - a file in
woocommerce/; - WooCommerce core;
- YITH Auctions or YITH Filters;
- Elementor or a saved snippet.
Theme overrides can become outdated after WooCommerce updates. Compare each override with the matching template shipped by the installed WooCommerce version before modifying it.
Persisted identifiers
Menu location names, sidebar IDs, Customizer setting keys, shortcode names, AJAX actions, Elementor widget names, and WooCommerce metadata may be stored in the database. Changing a label is usually safe; changing an identifier can disconnect saved content.
Adding a new module
- Put the file in the narrowest matching
inc/directory. - Guard direct access with
defined( 'ABSPATH' ) || exit;. - Prefix global functions, hooks, handles, option keys, and nonces with
smith_sons_. - Escape output, sanitize input, check capabilities, and verify nonces.
- Add the module to the ordered list in
functions.php. - Run PHP syntax checks and the relevant browser/WordPress regression tests.
Development commands
Read the scripts before running them; the current theme exposes:
# Build the product gallery bundle.
npm run build:gallery
# Check and lint theme JavaScript.
npm run check:js
npm run lint:js
# Run WordPress PHP coding-standard checks.
composer run lint:php
# Run the broader WordPress standard.
composer run lint:php:full
There is currently no generic npm test or composer test script in the theme.
Files not to edit directly
- WordPress core under
wp-adminorwp-includes - third-party plugin source
- generated/minified assets without updating their source
- dependency contents under
vendor/ornode_modules/ - uploads or generated Elementor CSS as a substitute for a source change