
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.

Two WooCommerce shortcodes that show the cart total or item count anywhere in WordPress and update without a reload when products are added.

Exclude WordPress post types and taxonomies from the Slim SEO sitemap.xml with two filters, for helper post types nobody should find.

Are you Curious how to remove the slug of a custom post type in WordPress? If you’re using CPT UI, there’s an option called With Front but that doesn’t always seem to work. Follow this tutorial, add these two simple functions and the slug will be removed from your custom post type URL. Note –…

Remove the Category:, Tag:, Author: and Archives: prefix from WordPress archive titles with one filter, and keep it where you still want it.

A WooCommerce cart icon shortcode with the item count that links to the cart, updates over AJAX and works in block themes and builders.

For retrieving the best buying products in WooCommerce we are using wp_query manipulation with meta_key as “total_sales” and orderby “meta_value_num”. In short we are displaying products as per the total sales number. Here is Screenshot for repeater / easy posts Step 1 – Select Advance WP Query Step 2 – Setup Advance WP Query as…

Add a short text after the WooCommerce product price, for all products or chosen product IDs, on product pages and shop lists, escaped and valid HTML.

Oxygen does not support WordPress wp_body_open() and if you need to integrate Google Tag manager it requires two code parts. 1st part is Inside Head and 2nd is inside Body. Lucky Oxygen provides hook that is called: ct_before_builder. If you are using Scripts Organizer , Code Snippets or any other functionality plugins this script will…

Iconoir is one of the biggest open source libraries with currently 1007 SVG Icons. Really nice designed outline icons set done by Luca Burgio. Original Icons are exported as outlines. I have converted outline to fill and used IcoMoon App to make it as icon set ready for Oxygen. Download them and enjoy! Thanks to…

Run JavaScript once on page load and again on every resize in WordPress, throttled to one run per frame and without jQuery.

Fade in WordPress headings and other elements with GSAP autoAlpha, loaded from a pinned CDN, visible without JavaScript and with reduced motion.

Number cards, columns or any repeated items in WordPress automatically with a CSS counter: add one class to the block, no jQuery needed.

Add a class to any WordPress element after the visitor scrolls a set number of pixels, with plain JavaScript and no jQuery.

Reload a WordPress page and land at the same scroll position, handy while you style sections below the fold or preview Scripts Organizer changes.

This technique requests Scripts Manager feature by Swiss Knife or Scripts Organizer to quickly import a script. Register Script We will start by going into Script Manager feature and paste CDN link or Upload it to media library to store it on our server. Give it a name, Script Type set as JavaScript, Location for…

Add a Pages dropdown to the WordPress admin bar with an edit link for every page, shown only to users who can edit pages.

Reload the WordPress front end automatically when you save a Scripts Organizer code block. Admins only, visible tab only, no fixed-timer reloads.
3rd party plugins actions admin admin bar archive block-themes block editor Blocks block styles block theme build core CSS custom post types Developer development filters full site editing gutenberg hook hooks Image img javascript load styles maintenance Must Have npm Oxygen performance php plugins scripts organizer security settings api single product tailwind theme.json Tips updates WooCommerce wordpress wp-cli wp-cron WP Admin