WordPress Memory Game Plugin
A feature-rich memory card matching game plugin for WordPress with customizable settings, multiple themes, and high score tracking.
Features
- ๐ฎ Classic memory card matching gameplay
- ๐จ Multiple theme options (Default, Dark, Kids, Professional)
- โ๏ธ Customizable game settings:
- Grid sizes (4x4, 4x5, 5x6)
- Timer types (countdown/count-up)
- Card flip animations
- Match delay timing
- ๐ผ๏ธ Custom card images and names
- ๐ High score tracking
- โธ๏ธ Pause/Resume functionality
- ๐ Restart game option
- ๐ฏ Move counter
- ๐ฑ Responsive design
- ๐ Translation-ready
Installation
- Download the plugin zip file
- Go to WordPress admin panel โ Plugins โ Add New
- Click โUpload Pluginโ and choose the downloaded zip file
- Click โInstall Nowโ and then โActivateโ
Usage
Creating a Memory Game
- In WordPress admin, go to Memory Games โ Add New
- Set a title for your game
- Configure game settings:
- Timer type (countdown/count-up)
- Timer value (10-300 seconds)
- Grid size (4x4, 4x5, 5x6)
- Card flip duration
- Match delay
- Theme selection
- Upload at least 8 card images (each image will be used to create a matching pair)
- Optionally add names for each card
- Publish your game
Adding the Game to Your Site
You can add the game to your site in two ways:
-
Automatic Display: The game will automatically appear below the content on its dedicated game page.
-
Using Shortcode: Add the game anywhere using the shortcode:
Replace โ123โ with your gameโs post ID.
Game Settings
Timer Options
- Timer Type: Choose between countdown (time limit) or count-up (elapsed time)
- Timer Value: Set duration in seconds (10-300)
Grid Sizes
- 4x4 (16 cards - 8 pairs)
- 4x5 (20 cards - 10 pairs)
- 5x6 (30 cards - 15 pairs)
Animation Settings
- Card Flip Duration: How long the flip animation takes (100-1000ms)
- Match Delay: How long non-matching cards stay revealed (500-3000ms)
Themes
- Default: Clean, light design
- Dark: Dark mode for low-light environments
- Kids: Colorful, playful design
- Professional: Business-friendly appearance
Customization
CSS Classes
The plugin uses the following main CSS classes for styling:
.wp-memory-game-container: Main container
.game-board: Game grid container
.card: Individual card elements
.card.flipped: Flipped card state
.card.matched: Matched card state
Theme Classes
Add custom themes by targeting:
.wp-memory-game-container.theme-your-theme-name {
/* Your theme styles */
}
Development
File Structure
wp-memory-game/
โโโ css/
โ โโโ style.css
โ โโโ themes.css
โโโ js/
โ โโโ game.js
โโโ languages/
โโโ wp-memory-game.php
โโโ README.md
Filters and Actions
The plugin provides hooks for extending functionality:
// Modify game settings before save
add_filter('wp_memory_game_settings', function($settings) {
// Modify settings
return $settings;
});
// Custom initialization
add_action('wp_memory_game_init', function() {
// Your initialization code
});
Requirements
- WordPress 5.0 or higher
- PHP 7.2 or higher
- Modern web browser with JavaScript enabled
License
This plugin is licensed under the GPL v2 or later.
Support
For bug reports and feature requests, please use the GitHub issues page or contact the plugin author.
Changelog
1.0.0
- Initial release
- Basic memory game functionality
- Multiple themes
- Customizable settings
- High score tracking
- Responsive design