Skip to content

WordPress theme with dynamic Google Fonts API integration, randomized content discovery, and anti-chronological design. Features recipe functionality, percentage-based font scaling, and universal customization for food blogs and content sites.

Notifications You must be signed in to change notification settings

chubes4/saraichinwag

Repository files navigation

Sarai Chinwag WordPress Theme

A versatile WordPress theme with advanced filtering, randomized content discovery, and full-width layout optimization. Features anti-chronological design that encourages serendipitous browsing through intelligent content presentation. See it in action at saraichinwag.com.

Features

Advanced Filter System

  • Multiple Sort Options: Random (default), Most Popular (by view count), Most Recent, Oldest
  • Content Type Filtering: Filter between Posts, Recipes, or All content seamlessly
  • AJAX-Powered: Real-time filtering without page reloads, preserves state across Load More
  • Mobile Optimized: Touch-friendly interface with collapsible design

Full-Width Layout System

  • Maximized Content Discovery: 4-column responsive grid on home and archive pages (vs traditional 2-3)
  • Strategic Sidebar Placement: Removed from browse pages, maintained on single content for discovery widgets
  • Responsive Grid: 4 columns (desktop) → 3 (laptop) → 2 (tablet) → 1 (mobile)
  • Performance Focused: Simple view counter system tracks popularity without complex analytics

Universal Theme Design

  • Recipe Site Mode: Full recipe post type with ratings, schema markup, and specialized templates
  • Standard Blog Mode: Clean blog functionality via admin toggle
  • White Label Ready: Customizable for any site type

Enhanced Navigation

  • Badge-Breadcrumb System: Clickable category/tag badges on single posts for intuitive navigation
  • Smart Breadcrumbs: Context-aware hierarchical navigation on archive pages
  • Random Discovery: Multiple random access points including /random-all for mixed content

Randomization Focus

  • Anti-Chronological Design: Randomization as default behavior breaks traditional blog patterns
  • Random Content Discovery: Home and archive pages encourage serendipitous browsing
  • Multiple Random Endpoints: /random-post, /random-recipe, and /random-all for instant discovery
  • Performance Optimized: Cached random queries for fast randomization without database strain

Dynamic Typography System

  • Google Fonts Integration: Access to all Google Fonts via API
  • Smart Font Organization: Display fonts for headings, sans-serif + serif for body text
  • Percentage-Based Scaling: 1-100% size control with proportional heading hierarchy
  • Responsive Design: All font sizes scale across breakpoints

Performance & Security

  • Transient Caching: 24-hour font list caching for optimal performance
  • Dynamic Asset Versioning: Automatic cache busting using filemtime()
  • Secure API Integration: Proper sanitization and escaping throughout
  • Optimized Loading: Only loads selected Google Fonts with font-display: swap

Admin Features

  • Theme Settings Panel: Configure API keys and toggle functionality
  • WordPress Customizer: Live preview font and size changes
  • Recipe Toggle: Completely disable recipe features for universal use

Installation

  1. Upload theme files to /wp-content/themes/saraichinwag/
  2. Activate the theme in WordPress admin
  3. Go to Settings → Theme Settings to configure Google Fonts API key
  4. Customize fonts and sizing via Appearance → Customize → Typography

Configuration

Google Fonts API Key

  1. Get your API key from Google Fonts Developer API
  2. Add it in Settings → Theme Settings → Google Fonts API Key
  3. All Google Fonts will then be available in the customizer

Universal Theme Usage

Toggle recipe functionality in Settings → Theme Settings:

  • Recipes Enabled: Full recipe site with ratings and schema
  • Recipes Disabled: Clean blog theme for any content type

Development

File Structure

saraichinwag/
├── php/                          # Modular PHP components
│   ├── filter-bar.php           # Advanced filter interface
│   ├── view-counter.php         # View tracking system
│   ├── sorting-archives.php     # AJAX filtering backend
│   ├── customizer.php           # Font customization system
│   ├── recipes.php              # Recipe post type
│   ├── ratings.php              # AJAX rating system
│   ├── related-posts.php        # Random discovery section
│   └── admin-settings.php       # Theme settings panel
├── js/                          # JavaScript files
│   ├── advanced-filters.js      # Filter system frontend
│   ├── customizer.js            # Live preview functionality
│   ├── rating.js                # Recipe rating interactions
│   └── nav.js                   # Navigation enhancements
├── template-parts/              # Reusable template components
│   ├── content-recipe.php       # Recipe display templates
│   ├── content-single.php       # Single post template
│   └── content.php              # Standard post template
└── fonts/                       # Local theme fonts

Coding Standards

  • WordPress coding standards throughout
  • All output properly escaped with esc_html(), esc_url(), etc.
  • Input sanitization with WordPress functions
  • Uses wp_remote_get() instead of cURL
  • Transient caching for expensive operations

Customization

Font System

  • Default: 50% = current theme appearance
  • Scaling: 100% = 2x larger, 1% = minimal
  • Fallbacks: Gluten (theme font) → System fonts
  • Categories: Display (headings) + Sans-serif/Serif (body)

CSS Custom Properties

:root {
  --font-heading: 'Font Name', fallbacks;
  --font-body: 'Font Name', fallbacks;
  --font-heading-scale: 1.0;
  --font-body-scale: 1.0;
}

Live Demo

See the theme in action at saraichinwag.com.

Support

For technical support, please create an issue in this repository or contact the developer at chubes.net.

License

This theme is designed for personal use and white-labeling. Commercial distribution requires permission.


Version: 2.1
Author: Chris Huber
Website: chubes.net
Theme URI: saraichinwag.com

Changelog

v2.1 - Advanced Filter & Layout System

  • NEW: Advanced filter bar with multiple sort options (Random, Popular, Recent, Oldest)
  • NEW: Full-width 4-column responsive grid layout for maximum content discovery
  • NEW: Simple view counter system for popularity tracking
  • NEW: Badge-breadcrumb navigation system for enhanced UX
  • NEW: Pinterest follow button relocated to footer
  • NEW: Random discovery section replaces complex related posts logic
  • IMPROVED: Mobile-optimized responsive design with touch-friendly controls
  • IMPROVED: AJAX filtering with seamless Load More integration
  • PERFORMANCE: Optimized queries and smart caching for all new features

About

WordPress theme with dynamic Google Fonts API integration, randomized content discovery, and anti-chronological design. Features recipe functionality, percentage-based font scaling, and universal customization for food blogs and content sites.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •