A WordPress plugin that provides Gutenberg blocks for common ad placeholder sizes.
Placeholders adds 14 customizable Gutenberg blocks for standard advertising sizes. Perfect for wireframing, prototyping, or reserving space for future ad placements.
- Leaderboard - 728×90px
- Medium Rectangle - 300×250px
- Wide Skyscraper - 160×600px
- Mobile Banner - 320×50px
- Billboard - 970×250px
- Large Rectangle - 336×280px
- Half Page - 300×600px
- Small Square - 200×200px
- Square - 250×250px
- Small Rectangle - 180×150px
- Vertical Rectangle - 240×400px
- Large Leaderboard - 970×90px
- Portrait - 300×1050px
- Netboard - 580×400px
- Go to Plugins → Add New in your WordPress admin
- Search for "Placeholders"
- Click Install Now and then Activate
- Upload the
placeholdersfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- In the block editor, search for any ad size (e.g., "Leaderboard") in the inserter
- Open any post or page in the block editor
- Click the '+' button to add a new block
- Search for an ad size (e.g., "leaderboard", "medium rectangle")
- Insert the block
- Customize the background and text colors using the block settings panel
- ✅ 14 standard IAB ad sizes
- ✅ Customizable background and text colors
- ✅ Support for wide and full alignment
- ✅ Responsive design
- ✅ Clean, minimal styling
- ✅ Shows dimensions and ad name
- ✅ Grouped in dedicated "Placeholders" category
The plugin uses WordPress Block API version 3 and follows modern WordPress development best practices.
placeholders/
├── .github/
│ └── workflows/
│ ├── deploy-to-wordpress-org.yml
│ ├── asset-update.yml
│ └── test.yml
├── .wordpress-org/ # WordPress.org plugin assets
├── bin/
│ └── install-wp-tests.sh
├── blocks/
│ ├── leaderboard/
│ │ └── block.json
│ ├── medium-rectangle/
│ │ └── block.json
│ └── [12 other ad sizes]/
│ └── block.json
├── tests/
│ ├── jest/
│ │ ├── blocks.test.js
│ │ └── setup.js
│ └── phpunit/
│ ├── bootstrap.php
│ ├── Test_Plugin.php
│ └── Test_Blocks.php
├── .gitignore
├── blocks.js # Client-side block registration
├── composer.json # PHP dependencies
├── composer.lock
├── editor.css # Editor styles
├── jest.config.js # Jest configuration
├── LICENSE.txt # GPL v2 license
├── package.json # Node dependencies
├── package-lock.json
├── phpunit.xml.dist # PHPUnit configuration
├── placeholders.php # Main plugin file
├── readme.txt # WordPress.org readme
├── README.md # GitHub readme
└── style.css # Frontend styles
# Clone the repository
git clone https://github.com/whyisjake/placeholders.git
# Install dependencies
npm install
# Symlink to your local WordPress installation
ln -s /path/to/placeholders /path/to/wordpress/wp-content/plugins/placeholdersThe plugin includes both PHPUnit tests for PHP code and Jest tests for JavaScript.
# Run Jest tests
npm run test:unit
# Run tests in watch mode
npm run test:unit:watch
# Run tests with coverage
npm run test:unit:coverageFirst, install the WordPress test suite:
# Install Composer dependencies
composer install
# Install WordPress test suite
bin/install-wp-tests.sh wordpress_test root '' localhost latest
# Run PHPUnit tests
vendor/bin/phpunit
# Run specific test file
vendor/bin/phpunit tests/phpunit/Test_Blocks.php
# Run with verbose output
vendor/bin/phpunit --verbose# Lint JavaScript
npm run lint:js
# Lint CSS
npm run lint:css
# Lint everything
npm run lint
# Auto-fix formatting
npm run formatThe plugin uses GitHub Actions for automated testing. Tests run automatically on:
- Every push to the
mainbranch - Every pull request
The CI pipeline tests against:
- PHP versions: 8.1, 8.2, 8.3
- WordPress versions: latest, 6.7, 6.6
- PHPUnit: 9.x (WordPress compatible)
This plugin uses GitHub Actions for automated deployment to WordPress.org.
-
Add your WordPress.org SVN credentials as GitHub secrets:
SVN_USERNAME: Your WordPress.org usernameSVN_PASSWORD: Your WordPress.org password
-
To deploy a new version:
# Update version in placeholders.php and readme.txt # Commit changes git add . git commit -m "Bump version to 1.1.0" # Create and push a tag git tag 1.1.0 git push origin main --tags
-
The GitHub Action will automatically deploy to WordPress.org
Place plugin assets in the .wordpress-org/ directory:
banner-772x250.png- High resolution bannerbanner-1544x500.png- Retina bannericon-128x128.png- Small iconicon-256x256.png- Large iconscreenshot-1.png- Screenshot 1screenshot-2.png- Screenshot 2- etc.
Contributions are welcome! Please feel free to submit a Pull Request.
GPL v2 or later
Jake Spurlock
- Website: https://whyisjake.com
- GitHub: @whyisjake
- Initial release
- 14 ad placeholder blocks
- Color customization support
- Alignment support
- Custom "Placeholders" block category