
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.

Fix the WordPress ‘Template part has been deleted or is unavailable’ error for a header or footer that still points at an old or parent theme slug.

Set the WordPress site URL in wp-config for a headless setup: keep WP_HOME on the CMS and send permalinks, REST links and visitors to your front end.

Find every WordPress post, template and pattern that shows “Your site doesn’t include support for the block”, with one Tools page and edit links.

Log the file, line and function that scheduled each WordPress Action Scheduler action, so you can see who queued it in WooCommerce’s Scheduled Actions.

Lock the Publish button in WordPress until a featured image is set, while Save Draft keeps working. Enforced in the editor and the REST API.

A PHP 8 attributes example for WordPress: put #[Dpc_Hook] on class methods and one small registrar wires every action and filter for you.

Generate Tailwind v4 design tokens from WordPress theme.json presets, so bg-primary and text-large use the same CSS variables as the block editor.

A WordPress enqueue script example for @wordpress/scripts builds: reads index.asset.php for dependencies and version, loads CSS, RTL and JS translations.

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.
3rd party plugins actions admin admin bar archive block-themes block editor block theme build capabilities core CSS custom post types database debugging development filters full site editing gutenberg hook hooks Image load styles maintenance media mu-plugin Must Have npm Oxygen performance php plugins rest api scripts organizer security single product theme.json Tips transients updates users WooCommerce wordpress wp-cli WP Admin