Skip to content

alexmaitken/wordpress-clear-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clear WordPress Theme

Clear is a minimalist editorial WordPress theme designed for text-first publishing, predictable typography, and privacy-friendly defaults suitable for open-source distribution.

Theme goals

  • Readable, calm layouts for articles and archives.
  • Minimal visual noise with good spacing and hierarchy.
  • Accessibility-conscious defaults (visible focus, semantic landmarks, keyboard-friendly navigation).
  • Privacy-first behavior by default (no external font requests unless explicitly enabled).

Customization options

In Appearance → Customize → Theme Presentation:

  • Accent color
  • Header layout (left/centered)
  • Show/hide reading time
  • Show/hide featured author strip on homepage
  • Show/hide related posts
  • Show/hide homepage tagline
  • Link author names/avatars to author pages
  • Optional footer copyright text
  • Optional opt-in for Google-hosted Inter font

Font strategy (privacy by default)

By default, Clear uses a system font stack and makes no remote font requests.

You can opt into Google Fonts either:

  1. Via Customizer: enable "Enable hosted Inter font from Google Fonts (external request)".
  2. Via filter in a plugin or child theme:
add_filter( 'clrthm_load_google_fonts', '__return_true' );

You can also override the URL:

add_filter( 'clrthm_google_fonts_url', function () {
	return 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap';
} );

The same behavior applies in both frontend and block editor to keep typography aligned.

Menu setup

Clear registers three locations:

  • Primary Menu — main navigation
  • Utility Menu — secondary links
  • Footer Menu — footer links

Assign menus in Appearance → Menus. Empty locations do not output unused navigation landmarks.

Post layout notes

Clear supports:

  • Featured images with theme-defined crop sizes
  • Per-post Clear post layout controls in the post editor sidebar (Featured image width + Featured image position)
  • Reading-time byline
  • Related posts section
  • Optional author strip

For single posts, you can set:

  • Featured image width: Content width, Large, Full width
  • Featured image position: Above title, Left of title, Right of title

Backwards compatibility: older layout-control tags (layout-left-image, layout-right-image, layout-full-width-image) are still honored when meta settings are not set, and remain hidden from public tag output.

Recommended tags/categories: use meaningful editorial taxonomy (for example, section/category + topic tags) so archive and related content layouts remain useful.

Recommended image sizes

  • Post thumbnail default: 1600 x 900 (hard crop)
  • Card image (clrthm-card): 960 x 640 (hard crop)
  • Single hero (clrthm-single-hero): 1400 x 900 (hard crop)

For best results, upload featured images at or above the largest target size.

Local development

composer install
composer test

Optional local WordPress stack:

docker compose up -d

Then open http://localhost:8080 and activate Clear.

Testing commands

composer lint             # PHP syntax checks
composer phpcs            # WPCS + Theme Review sniffs
composer smoke            # required file/header checks
composer test             # lint + phpcs + smoke
composer validate-version -- vX.Y.Z
composer build-release

Theme Unit Test instructions

Manual import:

  1. Download the Theme Unit Test XML data.
  2. In wp-admin: Tools → Import → WordPress.
  3. Upload XML and assign authors.

WP-CLI flow:

docker compose exec -T wordpress wp plugin install wordpress-importer --activate --allow-root
docker compose exec -T wordpress bash -lc 'curl -fsSL https://raw.githubusercontent.com/WPTRT/theme-unit-test/master/themeunittestdata.wordpress.xml -o /tmp/themeunittestdata.wordpress.xml'
docker compose exec -T wordpress wp import /tmp/themeunittestdata.wordpress.xml --authors=create --allow-root

Release/version process

Keep these versions in sync:

  • style.cssVersion:
  • readme.txtStable tag:
  • composer.jsonversion

Validate:

composer validate-version -- vX.Y.Z

Build package:

composer build-release

CI and release workflows run these checks automatically.

About

Clear Theme for Wordpress

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors