Custom Tabbed Product Grid
Mobile-optimized WordPress plugin for beautiful tabbed product grids
by Cliff Cordes · github.com/seltzertime/custom-tabbed-product-grid · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/seltzertime/custom-tabbed-product-grid/archive/refs/heads/main.zipRequires: WordPress 5.0+, PHP 7.0+ License: GPL v2 or later
A powerful, mobile-optimized WordPress plugin for creating beautiful tabbed product grids with customizable categories and images. Features fully responsive design with touch-friendly interactions.
🎯 Features
Core Functionality
- ✅ Unlimited Grids - Create as many product grids as you need
- ✅ Unlimited Categories - Organize products into unlimited tabs/categories
- ✅ Unlimited Products - Add unlimited products per category
- ✅ Dual Images - Primary and hover/secondary image for each product
- ✅ Flexible Layout - 2-6 column layouts, responsive to screen size
- ✅ Toggle Options - Show/hide titles, tabs, and library link
Mobile Optimization
- 📱 Mobile-First Design - 5 comprehensive responsive breakpoints
- 📱 Touch-Friendly - Optimized touch interactions for mobile devices
- 📱 Mobile Dropdown - Category selector on small screens
- 📱 Fluid Typography - Scales perfectly across all devices
- 📱 Responsive Images - Srcset and native lazy loading
Management Features
- 🗂️ Soft Delete - Trash/restore grids before permanent deletion
- 🗂️ Bulk Actions - Manage multiple grids at once
- 🗂️ Duplicate Grids - One-click grid duplication
- 🗂️ Export/Import - Backup and transfer grids via JSON
- 🗂️ Drag & Drop - Reorder categories and products easily
Professional Features
- 🔐 Secure - CSRF protection, input validation, SQL injection prevention
- 🌍 Translation Ready - Full i18n support with text domain
- ♿ Accessible - ARIA attributes, keyboard navigation, reduced motion support
- ⚡ Performance - Conditional asset loading, optimized queries
- 🎨 Customizable - CSS custom properties for easy theming
📦 Installation
Method 1: Upload via WordPress Admin
- Download the plugin ZIP file
- Go to Plugins → Add New in WordPress
- Click Upload Plugin
- Choose the ZIP file and click Install Now
- Click Activate Plugin
Method 2: Manual Installation
- Download and extract the plugin ZIP file
- Upload the
custom-tabbed-product-grid-v2-mobilefolder to/wp-content/plugins/ - Go to Plugins in WordPress admin
- Find Custom Tabbed Product Grid and click Activate
Method 3: FTP Upload
- Extract the plugin ZIP file
- Upload via FTP to
/wp-content/plugins/ - Activate in WordPress admin under Plugins
🚀 Quick Start
Create Your First Grid
- Go to Tabbed Grids in WordPress admin
- Click Add New Grid
- Configure:
- Grid Name - Internal name (not shown publicly)
- Grid Title - Displayed heading
- Description - Subtitle text
- Number of Columns - 2-6 columns
- Display Options - Toggle titles, tabs, library link
- Add Categories (tabs):
- Enter unique Category ID (lowercase, dashes only)
- Enter display name
- Add Products to each category:
- Product title
- Product link URL
- Primary image (always shown)
- Hover image (optional, shown on hover/tap)
- Click Create Grid
Display Your Grid
Copy the shortcode from the grid list:
[tabbed_product_grid id="1"]
Paste it into any post, page, or widget.
📖 Usage
Shortcode
[tabbed_product_grid id="X"]
Replace X with your grid ID (found in the admin list).
Shortcode Examples
[tabbed_product_grid id="1"]
[tabbed_product_grid id="5"]
Display Options
Configure in the admin editor:
- Show Product Titles - Display title under each product
- Show Category Tabs - Display category navigation
- Show "See Entire Library" Link - Display custom CTA link
- Number of Columns - Desktop columns (2-6)
Responsive Behavior
| Screen Size | Columns | Tab Display |
|---|---|---|
| Desktop (1201px+) | Configured (2-6) | Horizontal tabs |
| Laptop (1025-1200px) | Max 4 | Horizontal tabs |
| Tablet Portrait (769-1024px) | Max 3 | Scrollable tabs |
| Mobile Landscape (481-768px) | 3 | Dropdown |
| Mobile Portrait (320-480px) | 2 | Dropdown |
| Extra Small (<320px) | 1 | Dropdown |
Touch Interactions
Mobile Devices:
- Single Tap - Shows hover image for 2 seconds
- Double Tap - Toggles hover image permanently
- Tap Outside - Hides hover image
Desktop:
- Mouse Hover - Shows hover image
- Click - Follows product link
🎨 Customization
CSS Custom Properties
Customize colors and spacing by adding to your theme:
:root {
--tpg-accent-color: #5f7eff; /* Blue accent */
--tpg-active-color: #d5ff3d; /* Active/highlight */
--tpg-border-radius: 3.125rem; /* Rounded corners */
--tpg-border-color: #000000; /* Border color */
--tpg-bg-light: #F8F7F7; /* Background */
--tpg-link-color: #996633; /* Links */
--tpg-spacing-md: 1.25rem; /* Spacing */
}
Override Styles
Add to your theme's style.css or Appearance → Customize → Additional CSS:
/* Example: Change active tab color */
.custom-tabbed-product-grid-container .tab.active {
background-color: #your-color !important;
}
/* Example: Change grid gap */
.custom-tabbed-product-grid-container .custom-photo-grid {
gap: 10px !important;
}
🛠️ Grid Management
List View
Tabbed Grids page shows all grids:
- All - Published grids
- Trash - Deleted grids (recoverable)
Actions
Row Actions:
- Edit - Modify grid
- Duplicate - Create copy
- Export - Download as JSON
- Trash - Move to trash (soft delete)
- Delete Permanently - (Only in trash) Remove forever
- Restore - (Only in trash) Recover grid
Bulk Actions: Select multiple grids and:
- Move to Trash
- Restore
- Delete Permanently
- Duplicate
- Export
Import/Export
Export Grid:
- Click Export next to a grid
- Downloads
grid-X-2025-10-08.json
Import Grid:
- Click Import a Grid button
- Choose JSON file
- Click Import Grid
- Grid appears in list (name may have "(Imported)" appended)
🔧 Troubleshooting
Grid Not Displaying
- Check shortcode ID - Ensure ID matches grid in admin
- Check grid status - Must be "Published", not in trash
- Check theme compatibility - Try with default WordPress theme
- Clear caches - Browser, CDN, WordPress caching plugins
Images Not Loading
- Verify images uploaded - Check Media Library
- Check image IDs - Re-select images in grid editor
- Regenerate thumbnails - Use plugin like "Regenerate Thumbnails"
Styles Look Wrong
- Clear browser cache - Hard refresh (Ctrl+F5 / Cmd+Shift+R)
- Check theme conflicts - Inspect with browser dev tools
- Check plugin conflicts - Disable other plugins temporarily
Touch Not Working
- Check device - Test on actual mobile device, not just browser resize
- Check JavaScript errors - Open browser console
- Check jQuery loaded - Required dependency
Admin Not Saving
- Check browser console - Look for JavaScript errors
- Check server PHP errors - View error logs
- Increase PHP limits -
max_input_vars,post_max_size - Check permissions - User must have
manage_optionscapability
🔌 PHP Functions
For developers who want to use PHP instead of shortcodes:
<?php
// Display grid by ID
if (function_exists('ctpg_init')) {
$plugin = ctpg_init();
echo do_shortcode('[tabbed_product_grid id="1"]');
}
?>
🎯 Best Practices
Images
- Dimensions: Use square images (1:1 ratio) for best results
- Size: 600x600px minimum recommended
- Format: WebP for best performance, JPG/PNG supported
- Optimization: Compress images before upload
Product Titles
- Length: Keep concise (1-3 words ideal)
- Testing: Preview on 320px width devices
- Wrapping: Longer titles will wrap on mobile
Categories
- Count: Recommended 3-7 tabs for best horizontal fit
- IDs: Use descriptive slugs:
most-popular,best-sellers - Names: Clear, concise category names
Performance
- Product count: 50-100 products per grid performs well
- Image optimization: Always optimize images
- Caching: Use caching plugin for best performance
🆘 Support
Documentation
- Changelog: See
CHANGELOG.mdfor version history - Mobile Optimization: See
MOBILE-OPTIMIZATION-CHANGELOG.mdfor 2.0.0 details
Get Help
- Check this README
- Check
CHANGELOG.mdfor known issues - Contact: Cliff Cordes
- WordPress support forums
🔄 Upgrade Guide
From 2.0.0 to 2.1.0
- Backup your site
- Deactivate plugin
- Delete old plugin folder
- Upload new plugin
- Activate plugin (database auto-updates)
- Clear all caches
- Test your grids
✅ 100% Backward Compatible - All existing grids work immediately
👨💻 For Developers
File Structure
custom-tabbed-product-grid-v2-mobile/
├── custom-tabbed-product-grid.php # Main plugin file
├── uninstall.php # Cleanup on deletion
├── README.md # This file
├── CHANGELOG.md # Version history
├── includes/ # PHP classes
│ ├── class-database.php # Database operations
│ ├── class-admin.php # Admin interface
│ ├── class-ajax-handler.php # AJAX handlers
│ └── class-shortcode.php # Shortcode rendering
├── templates/ # PHP templates
│ └── shortcode-output.php # Frontend HTML
├── css/ # Stylesheets
│ ├── tabbed-product-grid.css # Frontend styles
│ └── admin.css # Admin styles
└── js/ # JavaScript
├── tabbed-product-grid.js # Frontend scripts
└── admin.js # Admin scripts
Database Schema
CREATE TABLE wp_tabbed_product_grid (
id mediumint(9) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
title varchar(255) NOT NULL DEFAULT '',
tab_count int NOT NULL DEFAULT 0,
product_count int NOT NULL DEFAULT 0,
data longtext NOT NULL,
status varchar(20) NOT NULL DEFAULT 'publish',
created_at datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (id),
KEY name_idx (name),
KEY status_idx (status),
KEY created_idx (created_at)
);
Constants
CTPG_VERSION // Plugin version (2.1.0)
CTPG_PLUGIN_FILE // Main plugin file path
CTPG_PLUGIN_DIR // Plugin directory path
CTPG_PLUGIN_URL // Plugin URL
Classes
Custom_Tabbed_Product_Grid- Main plugin classCTPG_Database- Database operationsCTPG_Admin- Admin interfaceCTPG_Ajax_Handler- AJAX request handlingCTPG_Shortcode- Shortcode rendering
Hooks
Currently no public hooks, but architecture supports easy addition.
📜 License
GPL v2 or later
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
🙏 Credits
- Development: Cliff Cordes
- Architecture: Object-oriented WordPress standards
- Testing: Internal QA
- Icons: WordPress Dashicons
📈 Changelog
See CHANGELOG.md for detailed version history.
Recent Updates
2.1.0 (2025-10-08)
- Major security and architectural overhaul
- Added trash/restore functionality
- Added bulk actions
- Added export/import
- Added duplicate functionality
- Complete code refactoring
- Full internationalization
- Enhanced security
2.0.0 (2025-10-08)
- Complete mobile optimization
- Responsive breakpoint system
- Touch-friendly interactions
- CSS custom properties
- Performance improvements
Made with ❤️ for WordPress