
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.

Remove the WooCommerce Marketing menu from the WordPress admin and keep Coupons under the WooCommerce menu.

Make WordPress save every uploaded file with a lowercase file name, or only images, so URLs stay consistent on case-sensitive servers.

Oxygen page builder Image element does provide the feature to insert an Image-type custom field’s Alt text using the dynamic data. but if you need overwrite then see 2nd option. Step for show alt tag for image. Ensure that your Image field’s Return Format is set to Image Array in your ACF field group. Step 2 Option 1 Option…

Register a WordPress sidebar (widget area) so clients on Oxygen Builder sites can manage widgets under Appearance → Widgets without opening the builder.

Change the WooCommerce Add to cart button text on product pages and shop lists, without renaming Select options or out of stock buttons.

Change the WooCommerce Out of stock notice and the shop button of unavailable products to Sold out, without touching products on backorder.

Make the WordPress search match the post title only, not the content, on the front-end search page; wp-admin and other queries keep the normal search.

Change the WooCommerce Add to cart button to Add again? when the product is already in the cart, on product pages and in shop loops.

Remove the WooCommerce “has been added to your cart” notice and its View cart button with one filter, while other store notices keep working.

Move out of stock products to the end of the WooCommerce shop and category pages, and keep the sorting your customer picked.

Disable the hover zoom on WooCommerce product images and keep the gallery and lightbox, with a short PHP snippet.

Sometimes you have a situation where you want the customer to log in, like a donation page, but you don’t want them to end up at /my-account/ but rather be taken back to the page where they were when they started. This code is useful for donation sites, as well as refer a friend scenarios.

Add a Copy button to every code block on your WordPress site with plain CSS and JavaScript: Clipboard API, http fallback, keyboard accessible.

Send WordPress users to the home page after they log out, instead of the login screen, with the logout_redirect filter.

Set the theme-color meta tag in WordPress so mobile browsers paint their address bar and top of the screen in your brand colour.

Show a red WordPress admin notice on every screen while “Discourage search engines from indexing this site” is ticked, so a live site is not left hidden.

Make every published post of a WordPress custom post type private automatically, while drafts, trash and other post types work as usual.

1st Step Install and activate Code Snippets plugin. Add below code in code snippets: 2nd Step Edit the Oxygen Template that applies to woo single products. For the element you want to apply the “minimum 1 upsell” condition, click on Conditions icon then Set Conditions. Click “Add Condition” icon. Choose Dynamic Data condition. Under Advanced click PHP Function Return value. Function Name: wpl_check_upsell_product…

A WordPress reading time shortcode that counts the raw post words, skips blocks and shortcodes, and works in content and templates.

Add an Image column with the featured image to the WordPress admin lists of posts, pages and custom post types, without an extra image size.
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