Skip to content

Repository files navigation

Moments

A modern, elegant WordPress theme designed for sharing life's precious moments. Built with a focus on visual storytelling, multimedia content, and user experience.

✨ Features

🎨 Media Layout System

  • Flexible Layout Options: Choose from three layout sizes for images and videos
    • Square (50% width) - Perfect for standard photos
    • Vertical/Narrow (50% width) - Ideal for portrait content
    • Wide/Horizontal (66% width) - Great for landscape media
  • Smart Aspect Ratio: Automatically preserves the original aspect ratio of your media
  • Multi-format Support: Images (JPEG, PNG, GIF, WebP), Videos (MP4, MOV, WebM), and Audio files

📝 Editor Experience

  • Rich Text Editing: Full-featured post editor with formatting options
    • Bold, italic, strikethrough text
    • Inline code snippets
    • Expandable full-text blocks
    • Link insertion
  • Media Management:
    • Upload from local files
    • Choose from media library
    • Insert from URL
    • Real-time upload progress
  • Post Options:
    • Private posts
    • Scheduled publishing with timezone support
    • Location tagging (City · Place)
    • Comment controls

🎭 Sticker System

  • Interactive sticker picker for expressive commenting
  • Multiple sticker packs support
  • Easy integration in posts and comments

💬 Comments & Interaction

  • Threaded comment system
  • Like functionality with guest tracking
  • Real-time interaction feedback
  • Comment moderation controls
  • Hub inbox for notification management

🌐 Localization

  • Full Chinese (zh_CN) translation
  • Extensible translation system
  • RTL support ready

🎵 Background Music

  • Built-in audio player
  • Playlist management
  • Autoplay options
  • Next track auto-play

🎨 Customization

  • Customizable banner with avatar and description
  • Flexible container width settings
  • HTML background image support
  • CDN asset loading support
  • Dark mode compatible design

📦 Installation

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • MySQL 5.6 or higher

Steps

  1. Download the theme

    git clone https://github.com/AoShin327/moments.git
  2. Upload to WordPress

    • Navigate to your WordPress installation
    • Copy the moments folder to wp-content/themes/
    • Or upload via WordPress Admin → Appearance → Themes → Add New → Upload Theme
  3. Activate the theme

    • Go to Appearance → Themes in WordPress Admin
    • Find "Moments" and click "Activate"
  4. Configure settings

    • Navigate to Appearance → Moments to customize theme settings
    • Set up your banner, avatar, and other preferences

🚀 Usage

Creating Posts

  1. Access the Editor

    • Click the "Write" button in the sidebar
    • Or navigate to the post editor from the admin bar
  2. Compose Your Post

    • Add a title (optional)
    • Write your content in the text area
    • Use formatting tools for text styling
  3. Add Media

    • Upload: Click "add new" to upload from your device
    • Library: Choose from previously uploaded media
    • URL: Insert media from external URLs
    • Select layout option (Square/Vertical/Wide) for single images or videos
  4. Add Location (optional)

    • Enter city name
    • Add specific place
    • Format: City · Place
  5. Set Publish Options

    • Choose publish date and time
    • Mark as private if needed
    • Configure comment settings
  6. Publish

    • Click "Post" to publish immediately
    • Or schedule for future publication

Managing Comments

  • Reply: Click on any comment to reply
  • Moderate: Admin users can approve/delete comments
  • Hub: Check your inbox for new comments and interactions

Customizing Appearance

Navigate to Appearance → Moments to configure:

  • General Settings

    • Container max width
    • Background image/preset
    • CDN host for assets
    • Infinite scroll toggle
  • Banner Settings

    • Avatar image URL
    • Display title
    • Description text
    • Background image
  • Audio/BGM Settings

    • Playlist entries (URL | Title format)
    • Autoplay options
  • Interaction Settings

    • AJAX delay timing
    • Comment cooldown period
    • Hub inbox configuration
    • Avatar sources

🖼️ Feature Preview

Screenshots coming soon...

🛠️ Technical Stack

  • Frontend: Vue.js, vanilla JavaScript
  • Styling: Custom CSS with CSS variables
  • Backend: PHP (WordPress theme architecture)
  • Media Processing: WordPress Media Library integration
  • Localization: WordPress i18n system (gettext)

📂 Project Structure

moments/
├── css/                    # Stylesheets
│   ├── bar.dialog.css     # Editor dialog styles
│   ├── post.content.css   # Post content styles
│   └── ...
├── js/                     # JavaScript files
│   ├── bar.dialog.js      # Editor functionality
│   └── ...
├── inc/                    # PHP includes
│   ├── bar-editor.php     # Post editor template
│   ├── form-comment.php   # Comment form
│   └── ...
├── lang/                   # Translation files
│   ├── moments-zh_CN.po   # Chinese translation source
│   └── moments-zh_CN.mo   # Compiled translation
├── img/                    # Theme images and icons
├── functions.php           # Theme functions
├── style.css              # Main stylesheet
└── README.md              # This file

🔧 Configuration

Theme Settings

All theme settings can be configured via WordPress Admin:

Appearance → Moments

Key configuration options:

  • Container width (default: 600-800px)
  • Background presets or custom CSS
  • CDN configuration for faster asset loading
  • Comment system behavior
  • Avatar and guest settings

Custom Hooks

The theme supports WordPress standard hooks:

  • wp_head / wp_footer (optional, can be disabled for performance)

API Endpoints

Custom search.php endpoints for:

  • ?s=post - Post creation/editing
  • ?s=mediaupload - File uploads
  • ?s=medialibrary - Media library queries
  • ?s=comment - Comment submission
  • ?s=postlike - Like tracking
  • And more...

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the GPL v2 or later - see the LICENSE file for details.

🙏 Credits

  • Theme Design & Development: AoShin327
  • Built with WordPress
  • Inspired by modern social media experiences

📞 Support

🔄 Changelog

See Releases for version history and changes.


Made with ❤️ for sharing life's moments

About

A wordpress theme like wechat moments

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages