
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.

Make every post background red in WordPress with one small PHP snippet: red only on single blog posts, with a filter to change the colour.

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.

Turn off the Gutenberg block editor for chosen post types in WordPress and use the classic editor for them, while posts and pages keep blocks.

Disable WordPress native lazy loading for images and iframes with one filter, or limit it to post content when only some images are affected.

Stop the WordPress emails sent after successful automatic core, plugin and theme updates, but still get an email when an update fails.
3rd party plugins actions admin archive block-themes block editor Blocks body-class build capabilities core CPT CSS Custom Post custom post types Developer development filters Front End full site editing gutenberg hook Image img load styles maintenance media mu-plugin Must Have npm Oxygen performance php plugins repeater scripts organizer security SEO single product Taxonomy Tips updates WooCommerce wordpress WP Admin