Add a custom WordPress admin dashboard widget showing post type stats and recent entries. Clean, escaped output with proper i18n.
Ship Faster with Production-Ready Code
Copy-paste WordPress snippets that follow coding standards. No bloat, no dependencies.
47 snippets
10 categories
7 languages
Code Snippets
Browse our collection of ready-to-use code snippets.
Loading...
47 snippets found
Accessible jQuery accordion with slide animation, ARIA attributes, and single-open behavior. Uses aria-expanded for screen readers.
Register a hierarchical custom taxonomy with full labels, REST API support, and admin column. Attach it to any custom post type.
Responsive 3-column card grid with Tailwind CSS — dark theme, hover effects, icon badges, and smooth transitions.
Load CSS and JS only on pages that need them — conditional enqueuing by template type for better PageSpeed scores.
Add custom sortable admin columns to any post type — render post meta in the admin list table with proper escaping.
Set up CSS custom properties for a complete dark theme — brand colors, neutrals, typography, and spacing with clamp() for fluid sections.
Debounced AJAX search input using jQuery — 300ms delay, minimum 2 characters, loading state, localized strings via wp_localize_script.
Cache expensive WP_Query results with transients and auto-flush on post save. Includes cache key strategy for different query variations.
Add a validated custom checkout field to WooCommerce billing — includes field rendering, validation, and order meta storage.
Register a custom post type with full labels, REST API support, archive page, and featured image. Production-ready with proper i18n.