Skip to content

Nabeelshar/webnovel-theme

Repository files navigation

Webnovel Theme for WordPress

A modern, beautiful WordPress theme designed for webnovel and light novel reading platforms. Inspired by sites like Wuxiaworld and WebNovel.

WordPress PHP License

Features

Frontend

  • Dark/Light Mode β€” toggle with localStorage persistence, OKLCH color system with warm-tinted neutrals
  • Hero Carousel β€” auto-rotating featured novels with artwork backdrop, synopsis, ratings, and navigation
  • Tabbed Browsing β€” Popular / New Releases / Completed tabs on homepage
  • Genre Browser β€” horizontal pill selector with AJAX-loaded ranked novel lists
  • Novel Detail Page β€” cover, stats (chapters, words, rating), synopsis, and sortable chapter list
  • Chapter Reader β€” serif reading font, drop cap, auto-bookmark, prev/next navigation
  • Responsive Design β€” mobile-first, works on all screen sizes

Backend

  • Novel Custom Post Type β€” with genre taxonomy, status (ongoing/completed/hiatus), author, rating meta
  • Chapter CPT β€” nested under novels with parent association, chapter numbering, and ordering
  • Admin Chapter Manager β€” drag-to-sort, quick-add modal, edit/view actions β€” all inside the Novel menu
  • Coin Locking System β€” per-chapter coin costs with MyCred integration
  • AJAX Unlock β€” readers spend coins to unlock chapters without page reload
  • Auto-Bookmark β€” saves reading progress per novel for logged-in users

Design System

  • OKLCH colors with warm-tinted neutrals
  • 4pt spacing scale
  • DM Sans (UI) + Source Serif 4 (reading) font pairing
  • Exponential ease-out motion curves
  • Focus-visible states and reduced motion support

Requirements

  • WordPress 6.0+
  • PHP 8.0+
  • MyCred plugin (for coin locking system)

Installation

  1. Download or clone this repository into wp-content/themes/
  2. Activate the theme in Appearance β†’ Themes
  3. Install and activate the MyCred plugin
  4. Go to Novels β†’ Add New Novel to start adding content
  5. Use Novels β†’ Manage Chapters to add and organize chapters

Theme Structure

webnovel-theme/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   β”œβ”€β”€ main.css          # Frontend styles (OKLCH, dark/light mode)
β”‚   β”‚   └── admin.css          # Admin chapter manager styles
β”‚   └── js/
β”‚       β”œβ”€β”€ main.js            # Carousel, tabs, genre AJAX, unlock
β”‚       └── admin.js           # Sortable chapters, add modal
β”œβ”€β”€ inc/
β”‚   β”œβ”€β”€ cpt-novel.php          # Novel post type + genre taxonomy
β”‚   β”œβ”€β”€ cpt-chapter.php        # Chapter post type + meta boxes
β”‚   β”œβ”€β”€ admin-chapters.php     # Admin chapter management page
β”‚   β”œβ”€β”€ coin-locking.php       # MyCred coin lock system
β”‚   β”œβ”€β”€ ajax-handlers.php      # All AJAX endpoints
β”‚   └── template-tags.php      # Helper functions
β”œβ”€β”€ front-page.php             # Homepage (carousel, tabs, genres, updates)
β”œβ”€β”€ single-novel.php           # Novel detail page
β”œβ”€β”€ single-chapter.php         # Chapter reader
β”œβ”€β”€ archive-novel.php          # Novel archive with filters
β”œβ”€β”€ taxonomy-genre.php         # Genre archive
β”œβ”€β”€ search.php                 # Search results
β”œβ”€β”€ header.php                 # Sticky header with nav, coins, theme toggle
β”œβ”€β”€ footer.php                 # Footer with links
β”œβ”€β”€ functions.php              # Theme setup
β”œβ”€β”€ style.css                  # Theme metadata
└── screenshot.png             # Theme screenshot

Coin Locking

Chapters can be locked behind a coin paywall:

  1. When editing a chapter, check "Lock this chapter" and set a coin cost
  2. Readers see a teaser + unlock prompt
  3. Clicking "Unlock" deducts coins via MyCred and reveals content via AJAX
  4. Admin users always see full content

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

GPL-2.0 β€” see LICENSE for details.

About

A modern WordPress theme for webnovel & light novel reading platforms. Features hero carousel, coin locking (MyCred), dark/light mode, chapter reader, genre browser, and admin chapter manager.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors