25% off ProSNIPC25OFF

Snippet library

WordPress code snippets, ready to use.

707 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.

PHP

Add Excerpt Support to Pages

Enables the Excerpt meta box on Pages so editors can write custom page descriptions used by themes and SEO plugins.

#admin#cpt#excerpt
PHPPro

CPT and Taxonomy Label Generator Helper

Provides a helper function that auto-generates a full labels array for any post type or taxonomy from a singular and plural name.

#cpt#helper#labels
PHP

Register a Custom Taxonomy

Registers a reusable hierarchical custom taxonomy and attaches it to posts and a custom post type, with REST API support.

#cpt#custom-taxonomy#register-taxonomy
PHPPro

Register an Events Post Type

Registers an Events custom post type with start/end date meta fields, REST API support, and a chronological archive slug.

#cpt#events#meta
PHPPro

Register a Team Members Post Type

Registers a Team Members custom post type with custom fields support for staff profiles, bios, and role information.

#cpt#register-post-type#staff
PHP

Register a Services Post Type

Registers a Services custom post type with an archive, excerpt, and thumbnail support for service listing pages.

#content#cpt#register-post-type
PHP

Register an FAQ Post Type

Registers an FAQ custom post type with REST API support so FAQ entries can be managed in the admin and queried via the block editor.

#content#cpt#faq
PHP

Register a Testimonials Post Type

Registers a Testimonials custom post type with a public archive, admin UI, and support for title, editor, and thumbnail.

#content#cpt#register-post-type
PHPPro

Notify Author When Post Published

Emails the post author when their content transitions to published status, with a link to view the live post.

#authors#email#notifications
PHPPro

Notify Admin on Contributor Submission

Sends the admin an email when a contributor submits a post for review, including the post title and an admin review link.

#contributors#email#moderation
PHPPro

Customize Password Reset Email

Replaces the default password-reset email with a branded HTML message that includes the site name and a styled reset link.

#branding#email#notifications
PHPPro

Customize New User Welcome Email

Replaces the default WordPress new-user notification with a branded HTML welcome email that includes the site name and login URL.

#email#notifications#onboarding
PHP

Disable Admin Email Verification Prompt

Removes the periodic WordPress nag that asks administrators to confirm their email address is still current.

#admin#email#notifications
PHP

Disable Admin Password-Change Emails

Stops WordPress from sending the admin notification email whenever a user changes their password.

#admin#email#notifications
PHP

Disable Automatic Update Emails

Suppresses all automatic core, plugin, and theme update notification emails to keep the inbox quiet.

#admin#email#notifications
PHPPro

Log All Outgoing Emails

Captures every outgoing WordPress email — recipient, subject, and timestamp — into a custom database table for delivery debugging.

#debug#email#logging
PHPPro

Add BCC to Outgoing Emails

Silently BCCs every outgoing WordPress email to an archive address for compliance or debugging purposes.

#bcc#email#logging
PHP

Set a Custom Reply-To Address

Adds a Reply-To header to every outgoing WordPress email so replies route to a chosen address instead of the sender.

#email#notifications#reply-to
PHP

Set Email Content Type to HTML

Forces all outgoing WordPress emails to use text/html content type so HTML markup renders in mail clients.

#email#html#notifications
PHP

Add Continue Shopping Button to Cart Page

Adds a Continue Shopping button to the WooCommerce cart page that links back to the shop, giving customers an easy way to return to browsing without using the browser back button.

#cart#navigation#shop
PHPPro

Add WhatsApp Enquiry Button to Product Page

Adds a click-to-chat WhatsApp button on single product pages that pre-fills a message with the product name and URL, letting customers enquire or order via WhatsApp.

#conversion#enquiry#product
PHP

Display Remaining Stock Quantity on Products

Replaces the generic 'In stock' availability text on WooCommerce product pages with the actual remaining stock count when stock management is enabled for the product.

#display#inventory#product
PHP

Restyle Sale Badge With Percentage Off

Replaces the generic WooCommerce 'Sale!' badge with a calculated percentage-off label (e.g. '-25%') for simple products; variable products keep the original badge.

#badge#display#products
PHPPro

Register a Custom WooCommerce Order Status

Registers an 'Awaiting Fulfilment' order status as a custom post status and adds it to WooCommerce's order status dropdown, enabling custom workflow stages.

#admin#orders#status