
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 @wordpress/components on a WordPress plugin settings page look like in the block editor by loading the core component styles on that page only.

Limit WordPress wp-admin and wp-login.php to an IP allowlist with PHP, keep AJAX, REST and cron working, with a wp-config off switch.

One of our customer requested a code snippet to write a function which will check that if current post or page has a specific Oxygen template assigned.

Disable emojis in WordPress: remove the emoji script and styles on the front end and in wp-admin, plus the feed, email and TinyMCE emoji handling.

When a WordPress search finds exactly one post, page or product, send the visitor straight to it instead of a results page with one item.

Hide the WordPress admin bar on the front end for subscribers, customers or any role you list, or for everyone, without a fatal error.

This code allows you to blur the background when someone triggers a modal, it helps put focus on the modal and not the background. The blur strength can be adjusted as needed. Add this to the main style sheet.

Here’s a PHP snippet that you can use to return a custom link to a specific language for the current page using WPML. This will output the custom link for the specified language code and can be used on any page. Example 1: This will output a link that says “Switch to French” and links…

This php snippet will provide you with a more efficient way of organizing and keeping track of your blocks in Oxygen builder.

A WooCommerce product gallery slider with CSS scroll snap and plain JavaScript: no jQuery, no CDN, assets only where the slider renders.

Prepared config files to get you started fast with best practices

Load the CSS of Scripts Organizer CSS or SCSS code blocks into the WordPress Gutenberg editor, so the editor canvas matches your site.

Limit WordPress search results to posts only, or to the post types you choose, without touching search forms that ask for a post type.

Replace the WordPress admin dashboard with a page you built in Gutenberg, Bricks, Oxygen or Elementor, shown full width next to the admin menu.

Send the WordPress New User Registration email to the site admin whenever a customer creates a WooCommerce account at My Account or checkout.

Move the WordPress admin menu from the left sidebar to a horizontal bar at the top with CSS only, with dropdown submenus and keyboard access.

Note : The use-cases for this are below : 1. Using Swiper Slider and want to edit all the slides in Oxygen and show slider view only on front-end. 2. Using Scripts that runs only on front-end or load after the page-load. In Oxygen builder they displays an error like ‘SCRIPTNAME’ is not defined or…
3rd party plugins actions admin archive block-themes block editor Blocks block styles block theme build Category core CPT CSS custom post types debugging development full site editing gutenberg hook hooks Image javascript load styles Must Have npm Oxygen performance php plugins repeater rest api scripts organizer security settings api single product tailwind Taxonomy theme.json Tips updates WooCommerce wordpress wp-cli WP Admin