
Copy-paste snippets for blocks, block themes, security, performance, Tailwind CSS, PHP and React. New snippets every Monday, Wednesday and Friday, each one run in a real WordPress before it is published.

A WP-CLI command that lists WordPress cron jobs and flags overdue events and hooks with no callback. Add –strict and it can fail a deploy check.

Restrict the WordPress REST API to logged-in users with one filter. Keep an allowlist of public routes such as oEmbed or the WooCommerce Store API.

Rename WooCommerce billing field labels in WordPress on checkout and My Account so they stay renamed after AJAX updates and country changes.

Build a WordPress admin settings page in React with @wordpress/components and apiFetch, saved through the REST settings endpoint with sanitized values.

A PHP 8.1 backed enum with tryFrom() that validates a WordPress select setting, labels its options and gives the rest of your plugin typed values.

Integrate Tailwind v4 with a WordPress block theme without a plugin: theme.json colors as Tailwind classes, scanned templates, styles in the editor.

Register and style your own Gutenberg block styles for the WordPress Heading block, so editors get extra headline looks in the Styles panel.

Add a Copy button to every core Code block in a WordPress block theme. Vanilla JS, top-right corner, shows Copied! for two seconds, loads only when needed.

Add text before or after WooCommerce product prices, like “From:” or “incl. VAT”, with an escaped, translatable WordPress snippet.

Put WordPress into maintenance mode without a plugin: visitors get a 503 page with Retry-After, administrators keep using the site.

Disable comments in WordPress completely without a plugin: close forms, hide old comments, empty comment blocks and remove the admin screens.

Disable WordPress automatic updates for major core versions, plugins and themes, while minor security releases keep installing on their own.

Add a product_cat_{slug} class to the body tag on WooCommerce single product pages in WordPress, so you can style each product category with CSS.

Show the post ID in a sortable column on every WordPress admin list, posts, pages and custom post types, with one Admin only snippet.

Disable the theme and plugin file editor in WordPress with DISALLOW_FILE_EDIT, plus a capability filter that holds even if wp-config says otherwise.
3rd party plugins admin archive block-themes block editor Blocks block styles block theme build capabilities Category core CPT CSS Custom Post custom post types development filters full site editing gutenberg hook hooks Image img load styles maintenance media Must Have npm Oxygen php plugins repeater scripts organizer security SEO single product Taxonomy theme.json Tips updates WooCommerce wordpress wp-cli WP Admin