A WordPress Gutenberg block plugin that lets you display information about your favorite Pokemon in a customizable card format.
The Pokemon Block plugin adds a new Gutenberg block to your WordPress editor, allowing you to:
- Search for any Pokemon by name
- Display a card with the Pokemon's official artwork
- Show key Pokemon stats (name, height, weight)
- Customize the appearance with WordPress block styling options
This plugin utilizes the PokeAPI to fetch Pokemon data dynamically, making it easy to display information about any of the 1000+ Pokemon available.
- Dynamic Pokemon Search: Enter any Pokemon name and load its data instantly
- Responsive Design: Card adapts to different screen sizes
- Customization Options:
- Alignment controls
- Background color options
- Text color options
- Margin and padding settings
- Error Handling: Clear feedback when Pokemon names are not found
- Loading State: Visual indicator during API requests
- Clean Interface: Simple, attractive card design
- Download the plugin zip file from the repository
- Go to your WordPress admin area: Plugins → Add New
- Click the "Upload Plugin" button at the top of the page
- Choose the downloaded zip file and click "Install Now"
- Activate the plugin through the 'Plugins' screen in WordPress
- Upload the plugin files to the
/wp-content/plugins/pokemondirectory - Activate the plugin through the 'Plugins' screen in WordPress
- Create or edit a post/page in the WordPress block editor
- Click the "+" button to add a new block
- Search for "Pokemon" and select the Pokemon block
- The block will initially load with Pikachu as the default Pokemon
- To change the Pokemon:
- Click on the block to select it
- Use the sidebar settings panel to enter a different Pokemon name
- Click the "Load" button to fetch the data
- Style your Pokemon card using the standard WordPress block controls:
- Use the alignment toolbar to position the card
- Change background and text colors in the sidebar
- Adjust spacing using the block dimensions panel
The Pokemon Block supports the following WordPress block customization options:
- Alignment: Left, center, right, wide, and full width
- Colors:
- Background color
- Text color
- Spacing:
- Padding
- Margin
This plugin was built using the WordPress Create Block script, which sets up the necessary build tools and project structure.
- Node.js
- npm
# Install dependencies
npm install
# Start development mode
npm start
# Build for production
npm run build
# Create a plugin zip file
npm run plugin-zippokemon.php- Main plugin filesrc/- Source codeedit.js- Block editor componentindex.js- Block registrationrender.php- PHP rendering for front-endstyle.scss- Styles for both editor and front-endeditor.scss- Editor-only stylesblock.json- Block configuration
- Uses WordPress Block API v3
- Built with React for the editor interface
- Fetches data from the PokeAPI
- Renders server-side in PHP for optimal performance
- Pokemon data provided by PokeAPI
- Pokemon images from the official Pokemon artwork collection
- Plugin scaffolding created with Create Block
This plugin is licensed under the GPL v2 or later.
- Initial release
- Basic Pokemon card display
- Search and load functionality
- Style customization options
