Weidenhammer - Custom
WordPress companion plugin for Weidenhammer's custom base theme. Features custom admin dashboard, utility functions, SVG support, Gravity Forms/WooCommerce integrations, and modern PHP practices (namespacing, autoloading). Production-ready code used across multiple client projects.
by Lee Gustin while working at Weidenhammer · github.com/ltgustin/plugin-agency-companion
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/ltgustin/plugin-agency-companion/archive/refs/heads/main.zipHammer Marketing Custom Plugin
A comprehensive WordPress companion plugin developed for Weidenhammer to enhance their custom base theme and streamline client website development. This plugin provides essential functionality, custom admin interfaces, and developer utilities that accelerate the creation of custom WordPress sites.
Overview
This plugin serves as a foundational component that works alongside Weidenhammer's custom base theme, providing shared functionality across multiple client projects. It demonstrates advanced WordPress plugin development practices including proper namespacing, autoloading, modular architecture, and integration with popular WordPress plugins.
Key Features
Custom Admin Dashboard
- Personalized Welcome Panel: Replaces the default WordPress dashboard with a custom interface tailored for client needs
- View Switching: Allows users to toggle between "Advanced" and "Essentials" dashboard views, showing/hiding menu items based on user preference
- Quick Actions: One-click tools for common tasks like cache clearing and maintenance
- Content Management: Quick access panels for adding new pages, posts, and managing forms
- Alert System: Customizable alert panels for important site notifications
Developer Utilities & Helper Functions
The plugin includes a comprehensive set of utility functions that speed up custom theme development:
- Social Media Integration: Functions for retrieving and displaying social media profiles and share buttons
- Modal System: Reusable modal component with accessibility features (ARIA support, keyboard navigation)
- Color Management: Centralized color system that outputs CSS custom properties for theme integration
- Custom Excerpts: Enhanced excerpt functionality with customizable length
- Breadcrumb Integration: Yoast SEO breadcrumb helper functions
- Link Helpers: Utility functions for processing ACF link fields
- Color Conversion: Hex to RGB conversion utilities
WordPress Core Enhancements
- Theme Setup: Automatically configures theme support for modern WordPress features (HTML5, post thumbnails, responsive embeds, etc.)
- Comments Management: Option to completely disable WordPress comments system across the site
- Permalink Configuration: Automatic setup of pretty permalinks on activation
- Timezone & Settings: Configures default WordPress settings (timezone, start of week, etc.)
Third-Party Plugin Integrations
Gravity Forms
- Custom submit button styling and markup
- Enhanced field classes for better CSS targeting
- Custom AJAX spinner replacement
- Improved accessibility with tabindex management
Advanced Custom Fields (ACF)
- Automatic block type registration from theme directory
- Custom user field groups for administrator settings
- Integration with ACF options pages
WooCommerce
- Custom wrapper markup for WooCommerce pages
- Theme support declarations for e-commerce functionality
Yoast SEO
- Breadcrumb helper functions
- Repositioned SEO metabox priority
Media Library Enhancements
- SVG Upload Support: Full support for uploading and managing SVG files in the WordPress media library
- SVG Preview: Proper dimension detection and preview generation for SVG files
- Alt Text Search: Enhanced media library search that includes alt text in search results
- Custom Image Sizes: Support for displaying custom image sizes in media library
Analytics Integration
- Google Tag Manager: Full GTM integration with dataLayer support
- Google Analytics: Alternative gtag.js implementation
- Configurable through ACF options pages
AJAX Functionality
- Post Filtering: AJAX-powered post filtering and taxonomy queries
- Load More: Infinite scroll / load more functionality for post archives
- Secure implementation with nonce verification
Admin Customization
- White Labeling: Custom admin footer text and branding
- Menu Management: Dynamic menu item hiding based on user roles and dashboard view preferences
- Admin Bar Cleanup: Removal of unnecessary WordPress admin bar items
- Login Page Styling: Custom login page with branded styling
Technical Highlights
Modern PHP Practices
- Namespacing: Proper PHP namespacing (
HammerPlugin) to avoid conflicts - Autoloading: PSR-4 style autoloader for automatic class loading
- Singleton Pattern: Main plugin class uses singleton pattern for single instance management
- Modular Architecture: Component-based structure for maintainability
WordPress Best Practices
- Security: Proper nonce verification, capability checks, and data sanitization
- Hooks & Filters: Extensive use of WordPress action and filter hooks
- Conditional Loading: Components only load when needed (admin-only, plugin-dependent features)
- Activation Hooks: Proper setup and configuration on plugin activation
Code Organization
hammer-marketing-custom/
├── Components/ # Modular component classes
│ ├── Dashboard.php # Custom admin dashboard
│ ├── Functions.php # Utility functions
│ ├── Admin.php # Admin enhancements
│ ├── Analytics.php # Analytics integration
│ ├── Ecommerce.php # WooCommerce integration
│ ├── ACFs.php # ACF integrations
│ └── Enqueue.php # Asset management
├── PostTypes/ # Custom post type handlers
└── assets/ # CSS, JS, and images
Requirements
- WordPress 6.4+
- PHP 8.1+
- Advanced Custom Fields (recommended)
- Gravity Forms (optional, for form enhancements)
- WooCommerce (optional, for e-commerce features)
Development Context
This plugin was developed as part of the workflow at Weidenhammer, an agency specializing in custom WordPress development. It represents a production-ready solution that has been used across multiple client projects, demonstrating:
- Understanding of WordPress plugin architecture
- Ability to create reusable, maintainable code
- Integration with popular WordPress ecosystem plugins
- Custom admin interface development
- Modern PHP development practices
- Security-conscious coding
Author
Lee Gustin - Developed while working at Weidenhammer
This plugin is designed to work alongside Weidenhammer's custom base theme and may require specific theme components to function fully.