Free to use

Code snippets

Small, ready-to-use pieces of PHP, JavaScript, and WooCommerce code from real client projects — copy them straight from the page, or grab the full file on GitHub.

WordPress

Let WordPress Manage Your  Tag

Hands <title> tag generation over to WordPress core instead of hardcoding it in header.php — required for accurate SEO titles and compatibility with SEO plugins.

View snippet
WordPress

Enable the Excerpt Field on Pages

Pages don't show an Excerpt box by default — this turns it on, the same way it already works for posts.

View snippet
WordPress

Two Ways to Reference Theme Images in Templates

Two equivalent ways to build the path to an image sitting inside your theme folder, for use directly in template markup.

View snippet
WordPress

Load a Google Font the Proper WordPress Way

Registers and enqueues a Google Font stylesheet through wp_enqueue_style, instead of hardcoding a <link> tag in your theme's header.

View snippet
WordPress

Only Show the Update Nag to Admins

Hides the “WordPress X.X is available” banner from everyone except users who can actually run the update — cleans up the dashboard for clients and editors.

View snippet
WordPress

Remove the Website Field From the Comment Form

Drops the optional URL field from the default comment form — a common ask since it mostly attracts spam links.

View snippet
WordPress

Hide Admin Menu Items for a Custom User Role

Clones the Administrator role into a new “Client” role, then trims the admin menu specifically for that role — gives clients full capability without a cluttered dashboard.

View snippet
WordPress

Load jQuery From Google’s CDN Instead of Locally

Swaps WordPress's bundled jQuery for a specific version served from Google's CDN, on the front end only.

View snippet
WordPress

Remove the Admin Bar’s Front-End Spacing Fix

Removes the small script WordPress adds to push page content down to make room for the admin bar — useful if you're hiding the bar another way and don't need the offset.

View snippet
WordPress

Limit Search Results to Regular Posts Only

Forces the default search to only return standard posts, keeping custom post types (and pages) out of search results.

View snippet
WordPress

Stop WordPress From Piling Up Image Edit Backups

By default, every time you crop or rotate an image, WordPress keeps the previous version around on the server. This makes it keep only the latest edit instead.

View snippet
WordPress

Enable Featured Images (Post Thumbnails)

Turns on theme support for featured images — required before the Featured Image box will even appear in the editor.

View snippet