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.
Register and Output a Custom Nav Menu
Adds a new menu location you can assign in Appearance → Menus, shows how to output it in a template, and includes the multi-menu version too.
View snippetDefine a Reusable Global String
A simple pattern for storing a value — like a phone number or address — in one place and reusing it anywhere in your theme.
View snippetAuto-Escape HTML Typed Inside Code Tags
Makes sure any markup typed inside <code> or <tt> tags in the editor gets escaped automatically, so it displays as visible text instead of being rendered as real HTML.
View snippetRegister and Output a Custom Image Size
Defines a new named thumbnail size, plus two different ways to pull that image back out in a template.
View snippetBuild a Simple Custom Settings Page
Adds a new page under Appearance with the WordPress Settings API wired up — a starting point for a theme options panel with your own fields.
View snippetTurn Off Post Revisions Entirely
Stops WordPress from saving a new revision every time you update a post or page.
View snippetRegister a Basic Custom Post Type
A minimal starting template for registering your own custom post type, with title/editor/excerpt/thumbnail support and archive pages enabled.
View snippetShow a Thumbnail Column in the Post List Table
Adds a small featured-image preview column to the posts list in wp-admin, so you don't have to open each post to see its thumbnail.
View snippetFully Disable Comments Site-Wide
Removes comment support from posts and pages, and hides the Comments menu from both the admin sidebar and the admin bar.
View snippetEnable Tags for Media Attachments
Same idea as attachment categories, but for tags — lets you tag individual media library items.
View snippetCap the Number of Saved Revisions Per Post
Instead of disabling revisions entirely, this keeps only a set number of the most recent ones.
View snippetAdd a “Lead” Class to a Post’s Opening Paragraph
Wraps the first paragraph of post content in a lead class, handy for styling an intro paragraph larger or bolder than the rest.
View snippet