A WordPress/ClassicPress plugin that creates Instagram-style grid layouts using your WordPress media library images. Display beautiful, responsive grids anywhere on your site using simple shortcodes.
- Visual Grid Editor - Drag-and-drop interface for arranging images
- WordPress Media Library Integration - Use existing images from your media library
- Multiple Aspect Ratios - Support for 1:1 (square) and 3:4 (portrait) ratios
- Responsive Design - Grids adapt beautifully to all screen sizes
- Image Linking - Add clickable links to individual images
- Dynamic Row Management - Add rows above or below existing content
- Multiple Grids - Create unlimited grids for different sections of your site
- Shortcode Display - Simple shortcode integration
[instagram_grid id="123"] - ClassicPress Compatible - Works with both WordPress and ClassicPress
- PHP 7.4 or higher
- WordPress 5.0+ or ClassicPress 1.0+
- Modern web browser with JavaScript enabled
- Download the latest release from the Releases page
- Upload the
instagram-grid-previewfolder to your/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to Instagram Grids in your WordPress admin menu
- Clone this repository into your WordPress plugins directory:
cd wp-content/plugins git clone https://github.com/JensS/instagram-grid-preview.git - Activate the plugin through the 'Plugins' menu in WordPress
Once available on WordPress.org, you can install directly from the WordPress admin panel.
- Go to Instagram Grids → Add New in your WordPress admin
- Enter a name for your grid
- Set your desired dimensions (columns and rows)
- Choose an aspect ratio (1:1 for square, 3:4 for portrait)
- Click on grid cells to add images from your media library
- Drag and drop images to reorder them
- Right-click on images to add clickable URLs (optional)
- Click Save Grid
After saving your grid, you'll receive a shortcode like:
[instagram_grid id="123"]
Add this shortcode to any post, page, or widget to display your grid.
id(required) - The grid IDclass(optional) - Custom CSS class for styling
Example:
[instagram_grid id="123" class="my-custom-grid"]
- Edit Grid - Click the grid name in the grids list
- Duplicate Grid - Use the "Duplicate" action to create a copy
- Delete Grid - Use the "Delete" action (this cannot be undone)
- In the grid editor, right-click on any image with content
- Enter the URL you want the image to link to
- Leave blank to remove an existing link
- Images with links will show a link indicator icon
- Click Add Row Above to insert a new row above the current row
- Click Add Row Below to insert a new row below the current row
- Existing images will be preserved and shifted accordingly
The plugin creates custom capabilities:
manage_instagram_grids- View grids listcreate_instagram_grids- Create new gridsedit_instagram_grids- Edit existing gridsdelete_instagram_grids- Delete grids
By default, these capabilities are granted to Administrator and Editor roles.
instagram-grid-preview/
├── instagram-grid-preview.php # Main plugin file
├── includes/ # Core plugin classes
│ ├── class-instagram-grid-preview.php
│ ├── class-igp-loader.php
│ ├── class-igp-grid-model.php
│ ├── class-igp-activator.php
│ ├── class-igp-deactivator.php
│ └── class-igp-i18n.php
├── admin/ # Admin interface
│ ├── class-igp-admin.php
│ ├── js/igp-admin.js
│ ├── css/igp-admin.css
│ └── partials/
├── public/ # Public-facing code
│ ├── class-igp-public.php
│ ├── js/igp-public.js
│ └── css/igp-public.css
└── languages/ # Translation files
The plugin creates one custom table: {$prefix}igp_grids
CREATE TABLE wp_igp_grids (
id mediumint(9) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
description text,
columns tinyint(3) NOT NULL DEFAULT 3,
rows tinyint(3) NOT NULL DEFAULT 3,
aspect_ratio varchar(10) NOT NULL DEFAULT '1:1',
grid_data longtext,
created_at timestamp DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);See CLAUDE.md for detailed development guidance and architecture documentation.
Q: Can I use the same image multiple times in a grid? A: Yes, you can add the same image to multiple cells.
Q: What happens if I delete an image from the media library? A: The grid will display a placeholder for that cell. You'll need to update the grid with a new image.
Q: Can I customize the grid styling?
A: Yes, use the class parameter in the shortcode to add custom CSS classes, or override the plugin's CSS in your theme.
Q: Is this compatible with page builders? A: Yes, the shortcode works in most page builders that support WordPress shortcodes.
Q: Will this slow down my site? A: No, the plugin is lightweight and only loads assets on pages where grids are displayed.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See CHANGELOG.md for a list of changes in each version.
This plugin is licensed under the GNU General Public License v2.0 or later - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: See this README and CLAUDE.md
Created by Jens Sage
- Sortable.js - MIT License - Drag-and-drop functionality
- WordPress Media Library - GPLv2 - Image selection interface
Future enhancements under consideration:
- Grid templates/presets
- Bulk image upload
- Caption overlay support
- Lightbox integration
- Grid animations
- Import/export grids
- Additional aspect ratios