Public WordPress Code Snippets
(Shared by WPCodeBin users. This list is not curated.)
How to Enable Dark Mode in WPCodeBox for a Better Admin Experience
View Code →
How to Add HockeyStack Code to Your WordPress Header
View Code →
How to Hide Empty Related Listings Tabs in MyListing Websites
View Code →
How to Hide Hours and Minutes from a Countdown Block
View Code →
How to Redirect Users After Listing Submission on Your MyListing Website
View Code →
How to Add a Back Button for Full-Screen Mode with SCSS Styling
View Code →
How to Moderate and Approve MyListing Website Reviews
View Code →
How to Remove the Promote Icon from MyListing Cards
View Code →
How to Disable CSS Lint in CodeMirror for WordPress
View Code →
How to Gate Content with Easy Digital Downloads and Oxygen Builder Based on User Purchases and Subscriptions
View Code →
How to Change WooCommerce Default Catalog Order By Price, Date, or Title
View Code →
How to Hide the Account Section on MyListing Submit Form
View Code →
How to Hide the Account Section on MyListing Submit Form
View Code →
How to Set Your MyListing Map’s Default Zoom to the Middle of the United States
View Code →
How to Set Your MyListing Map’s Default Zoom to the Middle of the United States
View Code →
How to Add Custom Styles to WPCodeBox UI in WordPress Admin
View Code →
How to Add Icons to Your MyListing Website Navigation Menu
View Code →
How to Hide Taxonomies From Quick Search
View Code →
How to Enable WPCodeBox Dark Mode in Admin Area
View Code →
How to Force SSL on Custom Post Types in WordPress
View Code →
How to Auto-Check Virtual and Downloadable Product Options by User Role in WooCommerce
View Code →
How to Show Outlines for Elements in Oxygen Builder
View Code →
How to Outline Layout Elements on Your Website’s Frontend
View Code →
How to Outline Layout Elements on Your Website’s Frontend
View Code →
How to Disable Beaver Builder Inline Editing
View Code →
How to Remove Social Link Options from Your MyListing Website Submit Form
View Code →
How to Remove MyListing Map Functionality and API Calls
View Code →
How to Center Your WPCodeBox Editor: A Step-by-Step Guide
View Code →
How to Disable WP-Cron for Better WordPress Performance
View Code →
How to Find and Count Orphaned WooCommerce Product Variations
View Code →
How to Encode Email Addresses with an Oxygen Custom Component
View Code →
How to Add WPCodeBox to Your WordPress Admin Bar
View Code →
How to Change WooCommerce Widget Titles
View Code →
How to Fix Nested Comment Replies with Yoast SEO and Oxygen Builder
View Code →
How to Add a Surcharge Percentage to All WooCommerce Orders
View Code →
How to Apply Custom Styling to Stripe Checkout Fields in WordPress
View Code →
How to Limit Image Upload Size on Your MyListing Website
View Code →
How to Add Custom Text Before the Purchase Button in Easy Digital Downloads
View Code →
Replace the WordPress Dashboard News Feed with a Custom RSS Feed
View Code →
How to Set Default User Registration Role in WooCommerce
View Code →
How to Use Shortcodes in Beaver Builder Layout CSS & JavaScript Settings
View Code →
How to Replace Front-End Text on a WordPress Website
View Code →
How to Replace Front-End Text on a WordPress Website
View Code →
How to Create a WooCommerce Thank You Page Condition in Oxygen Builder
View Code →
How to Add WooCommerce Checkout Field Labels Inside Input Boxes
View Code →
How to Change Sender Name and Email in Outgoing WordPress Emails
View Code →
How to Hide Admin Notifications in WordPress (Excluding Dashboard)
View Code →
How to Remove the Trash Button from WordPress Posts
View Code →
How to Disable the Block Editor for Widgets in Gutenberg
View Code →
How to Disable WordPress Embeds Using PHP Code
View Code →
How to Customize Excerpts for Password Protected WordPress Pages
View Code →
How to Disable the WordPress Fullscreen Editor by Default
View Code →
How to Disable the Block Editor for Managing Widgets
View Code →
How to Hide the Sign In Option on MyListing Add Listing Page for Less User Confusion
View Code →
How to Manage WordPress Modules: Show, Use, and Disable Them Effectively
View Code →
How to Hide Sign In and Register from the Navigation Menu
View Code →
How to Use CSS Variables for Flexible and Maintainable Web Design
View Code →
How to Get a List of All Loaded Shortcodes in WordPress
View Code →
How to Separate Product Categories on Your WooCommerce Shop Page
View Code →
How to Change WooCommerce Product Gallery Thumbnail Columns
View Code →
How to Add a Plugins Link to the WordPress Admin Bar
View Code →
How to Disable WordPress Global Inline CSS for Gutenberg
View Code →
How to Check if a URL Parameter Exists in Oxygen Builder
View Code →
How to Add Outlines on the Frontend in Bricks for Troubleshooting
View Code →
How to Add Outlines on the Frontend in Bricks for Troubleshooting
View Code →
How to Install WordPress Plugins and Themes Without FTP
View Code →
How to Disable WP-Cron in WordPress
View Code →
How to Add a Duplicate Post Button to Your WordPress Admin Panel
View Code →
How to Save Oxygen Builder Changes with Keyboard Shortcuts
View Code →
How to Change WooCommerce Product Tags to Category-Style Checkboxes
View Code →
How to Upload WP All Import Images to Post Date Folders
View Code →
How to Set a Minimum Order Amount in WooCommerce
View Code →
How to Show Random Posts on Your WordPress Homepage
View Code →
How to Disable WordPress Update Notification Emails
View Code →
How to Remove WordPress Dashboard Widgets
View Code →
How to Delete Orphaned WooCommerce Product Variations from Your Site
View Code →
How to Disable the Attachment Page in WordPress
View Code →
Duplicate Posts and Add a Duplicate Button in WordPress
View Code →
How to Implement a Maintenance Mode with a Secret Code in WordPress
View Code →
How to Add a Sortable Registration Date Column to Your WordPress Users Table
View Code →
How to Disable Plugin Deactivation in WordPress
View Code →
How to Hide Content from Logged Out Users
View Code →
How to Set WooCommerce Default User Registration Role
View Code →
How to Change the Login Header Text in WordPress
View Code →
How to Change $0 to Free in WooCommerce Using a Custom Code Snippet
View Code →
How to Remove Product Image Thumbnail Links in WooCommerce
View Code →
How to Disable Automatic Theme Updates
View Code →
How to Redirect Users After WooCommerce Registration
View Code →
How to Limit WooCommerce Cart to One Product and Redirect to Checkout
View Code →
How to Change WooCommerce Related Products Section Title
View Code →
How to Add Facebook Purchase Conversion Event to WooCommerce Thank You Page
View Code →
How to Disable Automatic Plugin Updates in WordPress
View Code →
How to Order Imported Items in WP All Import by Customizing Post Dates
View Code →
Add Google Tag Manager to Your WordPress Site
View Code →
How to Add Facebook Pixel to Your WordPress Header
View Code →
How to Change the WordPress Login Page Logo URL
View Code →
Hide the WordPress Admin Bar for All Users Except Admins
View Code →
How to Remove DNS-prefetch from WordPress Head to Improve Performance
View Code →
How to Add a Custom “Buy Now” Link to Easy Digital Downloads Purchase Buttons
View Code →
How to Automatically Update WooCommerce Cart Quantities
View Code →
How to Add Custom Styling to AffiliateWP Affiliate Area
View Code →
Allow SVG Uploads in WordPress
View Code →
How to Control Content Visibility with URL Parameters in Oxygen Builder
View Code →
How to Make Your Website Visible to Search Engines: A Guide to SEO Visibility
View Code →
How to Disable Password Reset Notices to Admin in WordPress
View Code →
How to Change User Roles in WooCommerce After Product Purchase
View Code →
How to Get WordPress, PHP, and Plugin Versions for Debugging
View Code →
How to Increase WooCommerce Variation Threshold to Show More Products
View Code →
How to Disable Password Reset in WordPress
View Code →
How to Set User Roles Based on WooCommerce Product Purchases
View Code →
Automatically Fill Image Alt Text and Metadata in WordPress on Upload
View Code →
How to Redirect WooCommerce Users After Checkout
View Code →
How to Update WooCommerce Product Price Dynamically with Quantity Changes
View Code →
Disable XML-RPC in WordPress
View Code →
How to Disable REST API Access for Guests
View Code →
How to Remove Your WordPress Version Number to Enhance Security
View Code →
Disable Gutenberg and Enable the Classic Editor in WordPress
View Code →
How to Remove Fields from WooCommerce Checkout Page
View Code →
How to Remove Fields from WooCommerce Checkout Page
View Code →
How to Redirect Add to Cart to Checkout Page in WooCommerce
View Code →
How to Use Custom Fonts in Oxygen Builder (and Other Platforms)
View Code →
How to Enable Maintenance Mode on Your WordPress Site for Non-Admins
View Code →
How to Delete Orphaned Post Meta Data in WordPress
View Code →
How to Make Automatic.css Grid Classes Compatible in Bricks Builder
View Code →
How to Redirect Users After Logout in WordPress
View Code →
How to Use Polylang for Multi-language WordPress Sites: A Guide to Locale Conditions and Templates
View Code →
How to Disable Emojis in WordPress
View Code →
How to Disable Theme and Plugin Editors in WordPress
View Code →
How to Hide the Leave Review Quick Action from the Listing Owner to Prevent Self-Reviews
View Code →
How to Disable Custom CSS in Beaver Builder Edit Mode
View Code →
How to Prevent WordPress from Scaling Large Images
View Code →
How to Prevent WordPress from Scaling Large Images
View Code →
How to Fix Nested Comment Replies with Rank Math and Oxygen Builder
View Code →
How to Add Gallery Cover Navigation Arrows to Your MyListing Website
View Code →
How to Show or Hide Content Based on User Role in WordPress
View Code →
How to Verify WordPress Core Checksums for Site Security
View Code →
How to Protect Your WordPress Posts with a Password
View Code →
WP All Export - Media Export/import
View Code →
My product details
View Code →
Custom CSS for Thumbnail Reveal
View Code →
Disable WooCommerce on the WPCodeBox page
View Code →
WpCodebox Edit Panel full Size
View Code →
WPCodeBox Responsive screen sizes in preview panel
View Code →
ACF File Field Upload Preview
View Code →
WooCommerce Archive - Change tag H3
View Code →
[Condition] TranslatePress in Breakdance Builder | WordPress
View Code →
Hide Wordpress Admin notifications
View Code →
Featured image column for posts / pages
View Code →
Media library Alt text column
View Code →
Custom Admin page for site Documentation
View Code →
WPCodeBox2 Layout controls
View Code →
[Media Library] Add Admin Column Media File Size (you can switch it on and off like normal)
View Code →
[Admin Columns] Posts / Pages Admin Columns - Show Thumbnail / Image Filename / Alt-Text / Excerpt / Permalink / slug (you can switch the columns on and off individually like normal)
View Code →
[Performance] Remove Wordpress bloat - Remove WP headers, RSS, Dashicons, Emojis
View Code →
[WP Top Admin-Bar] Add Links to wp-admin pages / Kadence Elements and Kadence Cloud (opens as new pages)
View Code →
[WP Top Admin-Bar] Clean up the Top Admin Bar
View Code →
Maintenance Page redirection snippet
View Code →
Exclude posts from a specific category
View Code →
[Condition] WPML Language
View Code →
Divi Flashing Unstyled Content On Page Load
View Code →
Add "Plugins" link to Admin top bar
View Code →
Remove Comments from Frontend and Admin Area
View Code →
Blocks test / numeric usernames / disposable emails from registering in woocommerce and wordpress - 2nd release
View Code →
Deregister WPCodeBox from the Tools menu
View Code →
Add LOGO with external link, that opens in new window, to the top of the left Admin Menu in Wordpress
View Code →
Add LOGO with external link to the top of the left Admin Menu in Wordpress
View Code →
Add WP Admin options menu to block disposable email addresses WIP
View Code →
Hide admin notices for everyone except a specific username.
View Code →
Minimal Static HTML caching
View Code →
Add Product Taxonomy Term to Body
View Code →
Inserting CSP and other security headers into WordPress
View Code →
Show/hide auxiliary columns in WPCB editor UI
View Code →
Change Studio Cart Url
View Code →
shortcode to implement the plugin "ACF Photo Gallery Field" (a bare bone acf pro alternative)
View Code →
block temporary email providers
View Code →
auto categorize new or updated posts depending on words in their title
View Code →
preload feature image
View Code →
Disable native lazy loading on images with a class of "no-lazy"
View Code →
[Oxygen Builder] Admin Bar Menus to directly open Pages, Posts & Templates with Oxygen
View Code →
Add Post ID Admin Column (for posts and pages)
View Code →
Change HTML LANG attribute
View Code →
Cache Gravatar - AI Generated, not tested
View Code →
WordPress Admin Dark mode
View Code →
Customize WordPress Login
View Code →
Dmitrii code snippet
View Code →
Filter Table (hide table wrapper if no result is found) - JavaScript
View Code →
Filter Table (hide table wrapper if no result is found) - JavaScript
View Code →
Table filter JS
View Code →
Adds a link in the adminbar to hide the list of WPCodeBox snippets
View Code →
Cloudflare Turnstile CSS customization for WP login screen
View Code →
Cloudflare Turnstile explicit rendering script
View Code →
Back to top JS
View Code →
Make Room in WP Admin Bar
View Code →
Show/Hide New/Edit Snippet and Snippet Navigator Panels via keyboard shortcuts
View Code →
Make WPCodeBox Full Width (Mod)
View Code →
A little button making the WPCodeBox editor full width
View Code →
Disable theme editing from dashboard
View Code →
Remove menu items for role(s)
View Code →
[Oxygen Condition] Has Oxygen Content
View Code →
Replace FSE WordPress Exit Logo with your own PNG
View Code →
Add a custom Dashboard Widget for your clients
View Code →
Remove WordPress Logo + Link in Admin Menu Bar
View Code →
Remove Dashboard Widgets
View Code →
Remove Admin Menu Items
View Code →
Rename "Howdy," to something else
View Code →
Disable WordPress comments without a plugin
View Code →
Redirect to custom URL after login (my-account in this case)
View Code →
Display a Hero Section, Page Title and Subtitle
View Code →
Allow SVG uploads in WordPress
View Code →
WPCodeBox Bash output on the right
View Code →
Add acf image custom column to admin posts and move column to desired position
View Code →
Add custom image column to admin posts
View Code →
[Condition] FluentCRM LIST Condition for Breakdance Builder
View Code →
[Condition] FluentCRM TAG Condition for Breakdance Builder
View Code →
[Condition] Password Protect Sections for Breakdance Builder
View Code →
Overwrite translation
View Code →
Redirect user to certain page if not logged in
View Code →
Add classes to <body>: Browser, page slug, post type
View Code →
Customize WordPress email sender name and address
View Code →
Remove Comments Feature
View Code →
Code Snippet that executes once per WooCommerce Order
View Code →
Update canonical URL
View Code →
Add an order number search field to the WP Admin top bar
View Code →
Disable all Elementor Pro widgets from showing in the editor
View Code →
Add shortcodes for Site Name, Site URL and Current Year
View Code →
Replace any string in WordPress
View Code →
Disable WordPress Admin Notices
View Code →
Output WooCommerce Endpoint Content
View Code →
WOO Custom End Point
View Code →
Remove F%^king fragments
View Code →
remove price span
View Code →
Show when scrolling down and hide when scrolling up (Custom sticky header for Elementor)
View Code →
PHP Info Test
View Code →
Add Dropdown Pages Links to WordPress Admin Bar
View Code →
Duplicate posts and pages without plugins
View Code →
Force oxygen assets version
View Code →
Deativate Gutenberg y CSS Gutenberg code
View Code →
HappyFiles.io Fancybox Gallery Shortcode
View Code →
WordPress Simple Images Functions
View Code →
Load a custom CSS file after Oxygen
View Code →
Enable WordPress maintenance mode
View Code →
Make WPCodeBox Full Width
View Code →
Add WPCodeBox in WP Admin Bar
View Code →