Free WordPress snippet library
WordPress snippets that just work.
256 ready-made snippets for security, speed, the admin area, SEO, WooCommerce and more. Each one written for Snipfire, tested on the latest WordPress before it went in, and free to use on any site.
Popular searches: WooCommerce login turn off admin checkout shortcode Google
- 256 snippets
- 29 one-click packs
- Tested with WordPress 7.1 and WooCommerce 11.1
- No account needed
- Let administrators upload SVG images Administrators can upload SVG files to the media library. Other users can’t, because an SVG file can contain scripts.
- Back-to-top button A round button at the bottom right that appears after scrolling down and takes visitors back to the top of the page.
- Use the classic editor Posts and pages open in the classic editor instead of the block editor, as with the Classic Editor plugin.
- Turn off comments everywhere Closes comments and pingbacks on every post and page, hides existing comments, and removes Comments from the admin menu, the admin bar and the dashboard. WooCommerce product reviews keep working.
- Turn off XML-RPC Blocks remote publishing, pingbacks and password guessing through xmlrpc.php. The block editor, the REST API and the WordPress apps don’t need it.
- Duplicate posts and pages Adds “Duplicate” under each post and page in the admin lists. The copy is a draft with the same content, categories, tags, custom fields and featured image.
- Send email through your mail server (SMTP) WordPress sends its emails through your mailbox’s SMTP server instead of the web server, so they arrive instead of landing in spam.
- Google Analytics 4 Adds the Google Analytics 4 tag to every page. Visits by administrators aren’t counted.
- Limit login attempts After 5 failed logins from the same IP address in 15 minutes, that address has to wait 15 minutes before trying again. Slows down password guessing.
- Your logo on the login page Shows the logo set in your theme (Site Logo or Customizer > Site Identity) on the login page instead of the WordPress logo.
- Maintenance mode Visitors see a simple “Back soon” page (with the proper 503 status for search engines) while you work. Logged-in editors see the site as usual.
- Meta description from the excerpt Posts and pages get a meta description from their excerpt (or the first words of the text), so search results show a summary you control. Skipped when an SEO plugin is active.
- Social sharing tags (Open Graph) Adds Open Graph and X card tags, so links to your posts show a title, summary and featured image on Facebook, LinkedIn, X and messaging apps. Skipped when an SEO plugin is active.
- Remove the emoji script and styles Stops WordPress from loading its emoji script and styles on every page. Every current browser shows emoji on its own.
- Change the “Add to cart” text Uses your own words on the add-to-cart buttons of product pages and of simple products in shop lists.
- Hide other shipping when shipping is free When an order qualifies for free shipping, the customer sees only free shipping (and local pickup, if you offer it) instead of paid options too.
- Minimum order amount Customers can’t check out until the cart reaches the amount you set. The cart says how much is missing.
- WhatsApp chat button A round WhatsApp button in the bottom corner that opens a chat with your number, with a message already typed.
- Admin bar for editors only Hides the admin bar on the public site for subscribers and customers. Users who can write posts still see it.
- Show the environment in the admin bar Adds a coloured “Staging”, “Development” or “Local” label to the admin bar on sites that aren’t live, so nobody edits the wrong copy of the site.
- A tidier admin bar Removes the WordPress logo menu, the comments bubble and the “+ New” menu from the admin bar. Everything is still in the admin menu.
- Keep subscribers and customers out of the admin area Users who can’t write posts are sent to the home page when they open the admin area. Their profile page and background requests still work.
- Your own welcome box on the dashboard Adds a box at the top of the dashboard with your message: who to call for help, links to your guides, anything your clients need.
- Your site name in the admin footer Replaces “Thank you for creating with WordPress” at the bottom of admin screens with your site’s name, and hides the version number from users who can’t update WordPress.
- Hide the admin colour scheme picker Removes the “Admin Color Scheme” choice from user profiles.
- Hide the Help tab Removes the Help tab at the top right of admin screens, for a tidier admin area.
- Hide admin menus from non-administrators Users who aren’t administrators no longer see the Tools and Comments menus. Change the list to hide what your editors don’t need.
- Last modified column in the posts list Adds a sortable “Last modified” column to posts and pages, so you can see what was updated recently.
- Authors see only their own posts and media In the admin area, users who can’t edit other people’s posts (authors, contributors) only see their own posts and their own uploads in the lists and the media library.
- Server versions in the admin footer The admin footer shows the WordPress, PHP and database versions for administrators. Handy when someone asks “which PHP are we on?”
- 50 posts per page in admin lists The posts, pages and products lists show 50 items per page instead of 20. Each user can still change it under Screen Options.
- Replace “Howdy” in the admin bar The admin bar greets users with just their name instead of “Howdy, name”.
- Colour posts by status in admin lists Draft, pending, private and scheduled posts get a coloured stripe in the posts lists, so you can tell them apart at a glance.
- Word count column in the posts list Shows how many words each post has in the posts list.
- Let administrators upload font files Administrators can upload WOFF2, WOFF, TTF and OTF fonts to the media library, for use in your CSS.
- Alt text from the file name When you upload an image without alt text, it gets one made from its file name (“red-summer-dress.jpg” becomes “Red summer dress”). Better than none; edit it for the best results.
- Stop sticky headers covering headings When a link jumps to a heading on the page (a table of contents, for example), the heading lands below your sticky header instead of behind it.
- Announcement bar at the top of the site A slim bar across the top of every page with your message and a link, for sales, opening hours or news. Visitors can close it, and it stays closed for them.
- Remove “Category:” from archive titles Archive pages show just “Recipes” instead of “Category: Recipes” (and the same for tags, authors and dates).
- Article structured data for posts Adds BlogPosting structured data (JSON-LD) to single posts: headline, dates, author, image. Helps Google understand and show your articles. Skipped when an SEO plugin is active.
- Keep large photos sharper WordPress shrinks uploaded images wider or taller than 2560 pixels. This raises the limit to 3000 pixels, which suits full-width photos on large screens.
- Hide a category from the blog page Posts in the category you choose don’t show on the main blog page. They’re still on their category page and in search.
- Breadcrumbs shortcode Type [breadcrumbs] where you want a trail like Home › Recipes › Lemon cake. Works for posts, pages (with parents), categories and search.
- Button shortcode Type [button url="/contact/"]Get in touch[/button] to add a button that looks like your theme’s buttons.
- List of child pages shortcode Type [child_pages] on a page to list the pages under it, with links. Keeps overview pages up to date by themselves.
- Use the classic widgets screen Appearance > Widgets and the Customizer go back to the classic widgets, as with the Classic Widgets plugin.
- A cleaner dashboard Removes the Welcome panel, WordPress Events and News, and Quick Draft from the dashboard.
- Close comments on posts older than 30 days New comments are only accepted on posts published in the last 30 days. Older posts keep their comments, but the form closes. Most spam goes to old posts.
- Spam trap in the comment form Adds a hidden field that people never see but bots fill in. Comments that fill it in are refused. No captcha, nothing sent to other companies.
- Only logged-in users can comment Visitors must log in before they can comment. Useful for membership sites and shops where only customers should leave comments.
- Maximum comment length Comments longer than 5,000 characters are refused. Spam bots often paste whole articles; real readers rarely write that much.
- Minimum comment length Comments shorter than 20 characters are refused with a friendly message. Stops “Nice post!” spam and empty replies.
- Newest comments first Shows the most recent comments at the top instead of the bottom.
- No clickable links in comment text Addresses typed in a comment show as plain text instead of links, so posting a link in your comments gains a spammer nothing.
- Don’t remember commenters in cookies WordPress stops saving the commenter’s name, email and website in cookies, and the “Save my name…” checkbox goes away. One less cookie to explain.
- No emails about comments waiting for approval WordPress stops emailing the site owner every time a comment is held for moderation. You still see them under Comments.
- No comments on media pages Closes comments on attachment pages, which nobody means to comment on and bots love.
- Remove the website field from comments The comment form stops asking for a website address, which removes the reason many spammers comment. Links already on old comments stay.
- Google Consent Mode defaults (all denied) Tells Google tags that visitors haven’t agreed to cookies yet, until your cookie banner says they have. Load it before Google Analytics or Tag Manager.
- “Copy” button on code blocks Code blocks in your posts get a small Copy button that copies the code to the clipboard. Great for tutorial sites.
- See scheduled tasks (WP-Cron) Adds Tools > Scheduled tasks for administrators: every WP-Cron event, when it runs next and how often. Handy for finding the plugin behind a slow site.
- Load Dashicons for logged-in users only The Dashicons icon font is loaded on the public site for the admin bar. Visitors who aren’t logged in don’t need it.
- Turn off date archives Date archives (/2024/05/) redirect to the home page. Most sites never link to them, but search engines still find and crawl them.
- Load the comment reply script only when needed Loads WordPress’s comment-reply script only on posts with open, threaded comments, instead of whenever a theme asks for it.
- Turn off application passwords Removes application passwords (logins for apps and scripts through the REST API) if you don’t use them.
- Turn off WordPress’s own sitemap Switches off /wp-sitemap.xml. Use it when an SEO plugin makes the sitemap instead, so search engines only find one.
- Turn off RSS feeds Every feed address (/feed/, comment feeds, category feeds) sends visitors to the home page, and the feed links leave the page head.
- Turn off the theme and plugin file editors Removes the code editors under Appearance and Plugins, so a stolen admin login can’t be used to write PHP into your theme or plugin files.
- Turn off site search Search results show the “not found” page, and search forms and Search blocks print nothing.
- No pingbacks to your own posts When you link to one of your own posts, WordPress sends it a pingback, which shows up as a comment. This stops that.
- Turn off speculative loading Stops browsers from loading the next page in the background when visitors hover over links (added in WordPress 6.8). Keeps analytics and server load exactly as before.
- Turn off pingbacks and trackbacks Closes pingbacks and trackbacks on every post, old and new. They’re almost all spam today.
- Autosave every 2 minutes The editor saves a backup copy of your work every 2 minutes instead of every minute. Fewer requests to a busy server.
- Click to enlarge every image Switches on WordPress’s built-in lightbox for all Image blocks, so visitors can click any image to see it full size. Editors can still turn it off per image.
- Turn off block suggestions from WordPress.org Searching the block inserter no longer offers to install block plugins from WordPress.org. Keeps editors from adding plugins by accident.
- Hide WordPress’s own block patterns Removes the patterns that come with WordPress itself from the inserter. Your theme’s and your own patterns stay.
- Open the block editor with the admin menu The block editor stops opening in fullscreen mode, so the WordPress menu stays visible. Anyone who switches fullscreen back on from the editor’s Options menu keeps their choice.
- Turn off Openverse images in the editor Removes the Openverse tab from the block editor’s media inserter, so editors only pick images from your own media library.
- No patterns from WordPress.org The pattern inserter shows only your theme’s and your own patterns, not the ones WordPress downloads from the pattern directory. The editor also loads a little faster.
- No welcome guide in the block editor The “Welcome to the block editor” popup doesn’t appear for new users. It’s still under the editor’s Options menu.
- Show the publish date and time in the posts list Adds a column to the posts list with the exact date and time each post was, or will be, published. Handy when you schedule a lot.
- Emails from your own address Emails WordPress sends come from an address you choose instead of wordpress@yourdomain.
- Emails from your site name Emails WordPress sends come from your site’s name instead of “WordPress”.
- No emails about plugin and theme auto-updates WordPress stops emailing you after it updates plugins and themes automatically. Failed updates are still reported.
- Don’t send emails from staging copies On staging, development and local copies of the site, WordPress doesn’t send any email, so customers never get a test order confirmation.
- No email to the admin when users change passwords The site administrator no longer gets an email each time a user resets their password.
- Spam-safe email address shortcode Type [email]you@example.com[/email] to show a clickable email address that’s scrambled in the page code, so address-harvesting bots can’t read it.
- Empty the trash after 7 days Deletes posts, pages and comments for good after 7 days in the trash, instead of 30.
- Shorter automatic excerpts Excerpts that WordPress makes from the post text are 30 words long instead of 55.
- “Read more” link after excerpts Automatic excerpts end with a “Read more” link to the post instead of […].
- Mark links to other sites Links in your posts that go to other websites get a small ↗ after them, so readers know they’re leaving your site.
- Open outside links in a new tab Links in your posts and pages that go to other sites open in a new tab. Menus and footers aren’t changed.
- Featured image column in the posts list Shows a small thumbnail of each post’s featured image in the posts and pages lists.
- Featured images in the RSS feed Adds each post’s featured image to the top of its feed entry, so feed readers and email newsletters built from your feed show it.
- Add products or other post types to the RSS feed Your main RSS feed includes the post types you choose (for example WooCommerce products) as well as posts.
- Link back to your site in the RSS feed Adds “The post … first appeared on …” with links to the end of every post in your feed. Scraper sites that copy your feed then link back to you.
- Publish to the RSS feed 15 minutes later New posts appear in your RSS feed 15 minutes after publishing, so you have time to fix a typo before feed readers and email newsletters pick them up.
- Summaries only in the RSS feed Your RSS feed shows a short summary of each post instead of the whole text, so readers visit the site to read on.
- Leave a category out of the RSS feed Posts in the category you choose don’t appear in your main RSS feed. Good for announcements or members-only posts.
- 20 posts in the RSS feed Your RSS feed lists the latest 20 posts instead of 10.
- Turn off comment feeds Comment feeds (/comments/feed/ and each post’s /feed/) redirect to the post or home page, and their links leave the page head. Your posts feed keeps working.
- Send visitors to the HTTPS address Visitors who open a page over plain http are redirected to the same page on https. Only runs on the live site (production), so local copies keep working.
- One message for every failed login The login form says “Wrong username or password” instead of telling a stranger whether a user name exists.
- Google Ads tag Adds the Google Ads (gtag.js) tag to every page, for conversion tracking and remarketing. Visits by administrators aren’t counted.
- Google Tag Manager (body) The second part of the Google Tag Manager container code, right after the opening body tag.
- Google Tag Manager (head) The first part of the Google Tag Manager container code, for the page head. Install “Google Tag Manager (body)” too.
- Cash on delivery fee (αντικαταβολή) Adds a fee to the order when the customer pays cash on delivery. The checkout totals update as soon as they pick it.
- Greeklish file names for uploads Uploaded files with Greek names get names in Latin letters (φωτογραφία.jpg becomes fotografia.jpg), so their addresses work everywhere.
- Greeklish addresses for Greek titles New posts, pages, products, categories and tags with Greek titles get addresses in Latin letters: “Καλοκαιρινά φορέματα” becomes kalokairina-foremata. Existing addresses don’t change.
- Receipt or invoice at checkout (Απόδειξη / Τιμολόγιο) Customers choose a receipt or an invoice. For an invoice they fill in company name, VAT number (ΑΦΜ, checked), tax office (ΔΟΥ) and business activity. The details are saved with the order and shown in the admin, the order emails and the order page.
- Check Greek phone numbers at checkout For customers in Greece, the checkout accepts only valid Greek phone numbers: 10 digits starting with 2 (landline) or 69 (mobile), with or without +30.
- Check Greek postcodes at checkout For addresses in Greece, the checkout accepts only valid 5-digit postcodes (10000 to 85999, with or without a space).
- Turn off the Heartbeat API on the public site Stops WordPress’s Heartbeat requests on the public site, where nothing needs them. The editor keeps its autosave and post locks.
- Hide the reCAPTCHA badge Hides Google’s reCAPTCHA badge from the bottom corner of every page.
- Hide the page title on the home page Hides the big page title (like “Home”) on a static front page. Other pages keep their titles.
- Hide update notices from non-admins Editors and other users stop seeing “WordPress X is available! Please notify the site administrator.”
- Hide the WordPress version Removes the version number from the page head and feeds, and from the addresses of WordPress’s own scripts and styles.
- Hold back updates for one plugin WordPress stops offering updates for the plugin you name, for example one you’ve customised or one whose next version breaks your site.
- Hotjar Adds Hotjar heatmaps and recordings to every page. Visits by administrators aren’t counted.
- Show IDs in the admin lists Adds an ID column to the lists of posts, pages, media and users.
- Sharper resized JPEG images Resized JPEG and WebP images are saved at quality 90 instead of WordPress’s 82. Slightly bigger files, noticeably crisper photos.
- Last updated date shortcode Type [last_updated] in a post or page and it shows the date it was last changed, like “Last updated: 12 March 2026”.
- Turn off lazy loading of images Images load straight away instead of when they scroll into view. Some sliders and lightbox scripts need this.
- Heartbeat once a minute in the editor The editor checks in with the server every 60 seconds instead of every 15, which lightens the load when several people edit at once.
- Keep 10 revisions per post Keeps the last 10 revisions of each post and page instead of every one, so the database doesn’t fill up with old versions.
- LinkedIn Insight Tag Adds LinkedIn’s Insight Tag to every page, for LinkedIn ads conversions and audiences. Visits by administrators aren’t counted.
- Log in / log out link shortcode Type [login_link] to show “Log in” for visitors and “Log out” for logged-in users, returning them to the same page afterwards.
- Login logo links to your site The logo on the login page links to your home page, with your site’s name, instead of WordPress.org.
- No password resets by email for administrators The “Lost your password?” link can’t be used to reset an administrator’s password. If an admin’s mailbox is ever hacked, the site isn’t.
- Hide the language switcher on the login page Removes the language dropdown under the login form (it appears when more than one language is installed).
- Your colours on the login page Gives the login page your background and button colours. Change the three colour values to match your brand.
- Send subscribers to the home page after login Users who can’t write posts (subscribers, customers) land on the home page after logging in, instead of an almost empty dashboard.
- Tick “Remember me” by default The “Remember me” box on the login page starts ticked.
- Lowercase file names for uploads Uploaded files get lowercase names (“Photo-Beach.JPG” becomes “photo-beach.jpg”), so addresses never break on servers that care about case.
- File size column in the media library Shows each file’s size in the media library’s list view, so you can spot the heavy ones.
- Members-only content shortcode Wrap text in [members_only]…[/members_only] and only logged-in users see it. Visitors see a short message with a login link instead.
- Meta (Facebook) Pixel Adds the Meta Pixel base code and counts a page view on every page. Visits by administrators aren’t counted.
- Microsoft Clarity Adds Microsoft Clarity (heatmaps and session recordings). Visits by administrators aren’t recorded.
- Stop the admin email check Every six months WordPress asks administrators to confirm the site’s admin email after they log in. This turns that screen off.
- Don’t store commenters’ IP addresses New comments are saved without the commenter’s IP address and browser details, so you keep less personal data.
- Stop making extra image sizes WordPress stops making the 768px, 1536px and 2048px copies of every image you upload. Saves disk space; your theme’s own sizes are still made.
- Don’t load avatars from Gravatar Turns avatars off, so visitors’ browsers don’t contact Gravatar (which would see their IP address and a code made from commenters’ emails).
- Turn off automatic plugin and theme updates WordPress no longer updates plugins and themes by itself, and the “Enable auto-updates” links go away. Useful when you test updates on staging first.
- Keep staging sites out of search engines On staging, development and local copies of the site, every page tells search engines not to index it. The live site isn’t touched.
- Keep search results pages out of Google Your site’s search results pages tell search engines not to index them. They’re thin, endless and a favourite of spammers who link to searches.
- Keep tag, date and author archives out of Google Tag, date and author archive pages ask search engines not to index them (links on them are still followed). Search results show your posts instead of lists of them.
- Excerpts for pages Adds the Excerpt box to pages, so they get a written summary for search results, archives and sharing, just like posts.
- Page stats for administrators Administrators see how long the page took to build, how many database queries it ran and how much memory it used, in the admin bar.
- Tags and categories for pages Lets you give pages tags and categories, just like posts, and shows them in the tag and category archives.
- Patterns in the admin menu Adds a Patterns link under Appearance for every theme, so you can manage your saved (synced) patterns in one list. Block themes already have it.
- Pinterest Tag Adds the Pinterest Tag to every page, for Pinterest ads conversions. Visits by administrators aren’t counted.
- Plausible Analytics Adds Plausible, a cookie-free analytics service that doesn’t collect personal data. Visits by administrators aren’t counted.
- Connect to Google Fonts early Tells browsers to connect to Google Fonts straight away, so text in your Google font appears sooner. Only for sites that load Google Fonts.
- Print-friendly pages When someone prints a page, menus, sidebars, comments and the footer are left out, and link addresses are printed next to the links.
- No email after successful automatic updates WordPress stops emailing you every time a plugin, theme or WordPress itself updates on its own. You still get an email when an update fails.
- Reading progress bar on posts A thin bar at the top of single posts fills up as the visitor scrolls through the article.
- Reading time shortcode Type [reading_time] in a post or template to show “4 min read”. [reading_time wpm="180"] changes the reading speed.
- Recent posts shortcode Type [recent_posts] to show a list of your latest posts anywhere. Choose how many and from which category: [recent_posts count="3" category="news"].
- Send attachment pages to the file Each uploaded image has its own thin page (…/image-name/). This sends visitors straight to the file instead, as new WordPress sites do.
- Respect “reduce motion” settings Visitors who asked their device to reduce motion get no smooth scrolling, animations or transitions on your site.
- Spam trap in the registration form Adds a hidden field to the wp-login.php registration form that bots fill in and people never see. Those registrations are refused.
- Remove the extra feed links Keeps the main posts and comments feeds in the page head, and removes the links to category, tag, author, search and per-post comment feeds.
- Stop loading jQuery Migrate jQuery Migrate helps very old jQuery code run. Most sites don’t need it on the public pages; the admin keeps it.
- Remove the REST API and oEmbed links Removes the REST API and oEmbed discovery links from the page head and the HTTP headers. The REST API itself keeps working.
- Remove the RSD and Windows Live Writer links Removes two links from the page head that only old desktop blogging apps used.
- Remove the shortlink Removes the ?p=123 shortlink from the page head and the HTTP headers.
- Don’t announce the PHP version Removes the X-Powered-By header that tells every visitor (and every scanner) which PHP version the server runs.
- Tables that scroll on phones Wide tables in posts and pages scroll sideways on small screens instead of breaking the layout.
- Ask AI crawlers not to use your content Adds lines to your robots.txt asking the crawlers that collect training data for AI models (OpenAI, Anthropic, Google, Apple, Meta, Common Crawl, ByteDance) to stay away. Normal search engines are not affected.
- No results page for empty searches Searching for nothing (an empty search box) sends the visitor back to the home page instead of listing every post.
- Highlight the search words in results The words a visitor searched for are highlighted in the titles and excerpts on the search results page.
- Leave pages out of search results Site search only looks through posts (and products, if you have a shop), not pages like Contact or Privacy policy.
- Go straight to the only search result When a search finds exactly one post, the visitor goes straight to it instead of a results page with one link.
- Add security headers Sends headers that stop other sites from framing your pages, stop browsers from guessing file types, keep full page addresses private when visitors follow links, and turn off camera, microphone and location access.
- Your brand colour for selected text Text that visitors select with the mouse is highlighted in your brand colour instead of the browser’s blue.
- Load styles only for blocks on the page Classic themes load the CSS for every block on every page. This loads only the styles of blocks actually used on the page.
- Share links shortcode Type [share_links] to add plain share links for X, Facebook, LinkedIn, WhatsApp and email. No scripts, no tracking, no cookies.
- Show which template a page uses Administrators see the theme file (or block template) that built the current page in the admin bar. Saves guessing when you edit a theme.
- Site verification tags (Google, Bing, Pinterest, Facebook) Adds the meta tags that prove to Google Search Console, Bing Webmaster Tools, Pinterest and Facebook that the site is yours. Delete the lines you don’t need.
- Leave tags and authors out of the sitemap WordPress’s built-in sitemap (/wp-sitemap.xml) lists your posts, pages and categories, but not tag archives or author pages.
- Slow down the Heartbeat API While the admin is open, WordPress checks in with the server every 15 to 60 seconds. Once a minute is enough for post locks and login checks, and saves server work.
- Smooth scrolling Links to a part of the same page (#contact) glide there instead of jumping. Visitors who asked their device for less motion still jump.
- Open pages instantly on hover When a visitor hovers over a link or starts tapping it, the browser starts loading that page, so it opens almost instantly. Uses WordPress’s speculative loading (6.8+).
- Stop visitors from listing user names Closes the usual ways to find your user names: ?author=1 links, the public users list in the REST API and the users sitemap. Logged-in editors still see authors as usual.
- TikTok Pixel Adds the TikTok Pixel to every page, for TikTok ads measurement. Visits by administrators aren’t counted.
- Today’s date shortcode Type [today] to show today’s date in your site’s date format, or pick your own: [today format="l, j F"].
- Smaller upload limit for non-administrators Users who aren’t administrators can upload files up to 2 MB. Stops 12 MB phone photos from filling the server.
- Keep uploads in one folder New uploads go straight into wp-content/uploads instead of year and month folders.
- Visitor’s first name shortcode Type [first_name] to greet logged-in users by name (“Welcome back, Maria!”). Visitors see nothing, or the fallback you set: [first_name fallback="friend"].
- Turn off author archives Author pages (/author/name/) redirect to the home page. On single-author sites they only repeat the blog and reveal the user name.
- Close new registrations Nobody can register a new account from wp-login.php, whatever the setting says. Existing users aren’t affected.
- Log in with the email address only Users log in with their email address; user names are no longer accepted. Attackers usually guess user names, not email addresses.
- Last login column for users Remembers when each user last logged in and shows it in the users list. Useful for finding accounts nobody uses any more.
- Stay logged in for 30 days With “Remember me” ticked, users stay logged in for 30 days instead of 14.
- Passwords of at least 12 characters Users can’t set a password shorter than 12 characters when they reset it, register or edit their profile.
- No email to the admin for each new user WordPress stops emailing the site administrator every time someone registers. The new user still gets their welcome email.
- Registration date column for users Adds a sortable “Registered” column to the users list.
- Social profile fields for users Adds X, LinkedIn, Instagram and Facebook fields to user profiles. Themes and author boxes can show them with get_the_author_meta( 'linkedin' ).
- Clear keyboard focus outlines Keyboard users see a clear outline around the link or button they’re on. Many themes hide it; it matters for accessibility.
- Remove “Downloads” from My account Removes the Downloads tab from the customer’s My account page, for shops that don’t sell downloadable products.
- My account opens on the orders list Customers who open My account land straight on their orders instead of the dashboard page.
- Load WooCommerce scripts and styles only on shop pages WooCommerce’s CSS and JavaScript load only on the shop, product, cart, checkout and account pages, not on your blog posts and other pages.
- “Call for price” when there’s no price Products without a price show “Call for price” instead of nothing.
- Catalogue mode: show products without selling Products can’t be bought: the add-to-cart buttons disappear and the cart stays empty. Prices still show. For showrooms, B2B catalogues or a shop that isn’t open yet.
- Cash on delivery only up to €300 Cash on delivery disappears from the payment methods when the order total is above the amount you set.
- Complete paid orders of virtual products Paid orders that contain only virtual products (services, memberships, tickets) go straight to Completed instead of waiting in Processing.
- “Continue shopping” goes to the shop After adding a product, the “Continue shopping” link goes to the shop page instead of back to the last product.
- Hide the coupon field on the cart page The cart page no longer shows the coupon box; customers enter coupons at checkout. Fewer people leave to hunt for codes.
- Apply a coupon from a link Links like example.com/?coupon=SUMMER10 apply that coupon to the visitor’s cart, even before they add products. Perfect for newsletters and ads.
- “Empty cart” button Adds an “Empty cart” button to the cart page that removes everything in one click.
- “Free” instead of €0.00 Products that cost nothing show “Free” instead of €0.00.
- “Spend €12 more for free shipping” in the cart The cart and checkout show how much more the customer needs to spend to get free shipping, and congratulate them when they get there.
- Google Analytics 4 purchase event Sends a GA4 “purchase” event with the order’s items and total from the order confirmation page, once per order. Needs the Google Analytics 4 snippet (or gtag.js) on the site.
- Hide out-of-stock products Products that are out of stock disappear from the shop, categories and search, whatever the WooCommerce setting says.
- Prices for logged-in customers only Visitors who aren’t logged in see “Log in to see prices” instead of prices, and can’t add to the cart. For wholesale and trade shops.
- Hide SKUs on product pages Product pages stop showing the SKU. You still see and search it in the admin.
- “Only 3 left” when stock runs low When 5 or fewer are left, the product page says “Only 3 left – order soon” instead of “3 in stock”.
- At most 10 of each product per order Customers can buy at most 10 of any product in one order. The quantity box stops at 10 and the cart explains the limit.
- “New” badge on recent products Products added in the last 30 days show a “New” label in the shop and category pages.
- Send new order emails to another address too New order notifications also go to a second address, for example your warehouse or accountant.
- Newest products first in the shop The shop and category pages list the newest products first, unless the visitor picks another order.
- Newsletter checkbox at checkout Adds an unticked “Send me news and offers by email” checkbox to the checkout. The choice is saved on the order and shown in the order screen.
- Remove the “Description” heading Removes the “Description” heading inside the Description tab on product pages, which just repeats the tab’s name.
- Turn off the product image zoom Product images stop zooming when the mouse moves over them. The gallery and lightbox still work.
- Remove WooCommerce’s Marketing menu Hides the Marketing menu and its recommendations. Coupons move back under WooCommerce.
- No WooCommerce marketplace suggestions Removes the extension suggestions WooCommerce shows in its admin screens.
- Turn off the password strength meter Removes WooCommerce’s password strength meter from the account and checkout pages. It loads a 400 KB script and blocks weak but acceptable passwords.
- Remove the shipping calculator from the cart Removes the “Calculate shipping” form from the cart page. Customers see shipping costs at checkout.
- Prefix for order numbers Order numbers show with a prefix, like WEB-1234, in emails, My account and the admin. The real order ID doesn’t change.
- Customer phone in the orders list Adds a Phone column to the WooCommerce orders list, so you can call a customer without opening the order.
- Make the phone number optional at checkout The billing phone field stays at checkout but customers can leave it empty.
- Change the “Place order” button text The checkout button says “Complete purchase” (or whatever you write) instead of “Place order”.
- 24 products per shop page The shop and category pages show 24 products per page.
- Four related products in one row Shows four related products in a row of four under each product.
- Remove the “Additional information” tab Removes the Additional information tab (weight, dimensions, attributes) from product pages.
- Remove checkout fields you don’t need Removes company name and the second address line from the checkout. Edit the list to remove other fields.
- Remove “You may be interested in…” from the cart The cart page stops showing cross-sell products.
- Remove the order notes field Removes “Order notes” from the checkout.
- Remove categories and tags from product pages Removes the “SKU / Category / Tags” line under the add-to-cart button on single product pages.
- Remove related products Single product pages stop showing the “Related products” section.
- Remove “Showing all 12 results” Removes the result count line above the products on shop and category pages.
- Remove the Reviews tab Removes the Reviews tab from product pages, for shops that don’t take reviews.
- Remove the “Default sorting” dropdown Removes the sort dropdown from the shop and category pages.
- Rename the product tabs Renames the product page tabs, for example “Additional information” to “Specifications”.
- Show the discount on sale badges Sale badges show the discount, for example “-20%”, instead of “Sale!”. For variable products it’s the biggest discount.
- “Ship to a different address?” starts unticked The checkout’s “Ship to a different address?” box always starts unticked, so the shipping fields stay hidden unless the customer needs them.
- Three products per row in the shop The shop and category pages show three products per row.
- Go straight to checkout Add to cart takes customers straight to the checkout instead of the cart. Suits shops that mostly sell one product at a time.
- One of each product per order Every product can only be bought once per order (the quantity box disappears). For courses, tickets and one-off items.
- “Sold out” badge on shop pages Out-of-stock products show a “Sold out” label on their image in the shop and category pages.
- Your own thank-you message after ordering Replaces “Thank you. Your order has been received.” on the order confirmation page with your own words.
- “From €19” instead of a price range Variable products show their lowest price as “From €19” instead of “€19 – €49”.
- “You save €10” on sale products Product pages of items on sale show how much the customer saves, under the price.
- Save resized images as WebP The smaller copies WordPress makes of your JPEG and PNG uploads are saved as WebP, which is usually 25–35% smaller. The original upload stays as it is.
- Current year shortcode Type [year] anywhere, for example “© [year] My Shop” in the footer, and it always shows the current year.
- Years since shortcode Type [years_since year="2008"] and it shows how many years have passed, like “18”. For “In business for [years_since year="2008"] years”, always up to date.
No snippet matches that yet. Tell us what you need and we'll consider adding it. Suggest a snippet
Or install a whole pack
Packs group snippets that belong together. Open one in Snipfire, tick what you want and install: everything arrives switched off, or switched on together after one test load. Snippets that need your details, or that change how the whole site behaves, always stay off until you say so.
- Harden WordPress Close the doors attackers try first: XML-RPC, user name discovery, the file editors, revealing login errors. 7 snippets
- Clean up the head Remove the links, scripts and styles WordPress adds to every page that most sites never use. 7 snippets
- Performance Small changes that save the server and the browser some work. 7 snippets
- Turn off what you don’t use Each of these replaces a small plugin: no comments, classic editor, no feeds, no search and more. 9 snippets
- Admin and login Your branding on the login page, a tidier admin, and handy extras such as duplicating posts. 8 snippets
- Content and media Shortcodes, links, images and small design touches for the public site. 10 snippets
- WooCommerce essentials The small WooCommerce changes shop owners ask for most. 11 snippets
- Greek e-shop For shops in Greece: receipt or invoice with a checked VAT number (ΑΦΜ), Greek phone and postcode checks, a cash on delivery fee, and greeklish addresses. 6 snippets
- Privacy and GDPR Keep less personal data and send less of it to other companies. 4 snippets
- Analytics and pixels The usual tracking codes, ready to paste your ID into. Administrators’ visits aren’t counted. 6 snippets
- Comments Fewer spam comments and more control: close old posts, set minimum and maximum lengths, a spam trap, no links. 13 snippets
- Posts and the editor Make the block editor calmer and give pages excerpts, tags and categories. 14 snippets
- Images and media Sharper, lighter images, tidier uploads and a more useful media library. 11 snippets
- More admin tweaks Useful columns, a tidier admin bar, a welcome box for clients, and fewer menus for editors. 15 snippets
- Users and profiles Registration dates, last logins, social profile fields, longer sessions and stricter passwords. 9 snippets
- Login and security extras Limit login attempts, email-only logins, a registration spam trap and more hardening. 11 snippets
- Email Emails from your name and address, sent through SMTP, and fewer notification emails. 8 snippets
- SEO basics Meta descriptions, social sharing tags, article structured data and cleaner indexing, for sites without an SEO plugin. 11 snippets
- RSS feeds Control what your RSS feed shows, and when. 7 snippets
- Search and archives Better site search and cleaner archive pages. 6 snippets
- Design touches Small front-end touches: a reading progress bar, an announcement bar, a WhatsApp button, accessibility fixes. 11 snippets
- Shortcodes Handy shortcodes for dates, breadcrumbs, buttons, share links, members-only content and more. 12 snippets
- More speed More ways to load less: block styles, speculative loading, fewer scripts. 9 snippets
- Turn off more More features you may not need: sitemaps, trackbacks, automatic updates, pattern suggestions. 11 snippets
- Developer tools Maintenance mode, template names, page stats, environment labels and a WP-Cron viewer. 9 snippets
- WooCommerce: shop and product pages Badges, price display, tabs and layout for your shop and product pages. 22 snippets
- WooCommerce: cart and checkout Free-shipping progress, coupon links, quantity limits and a cleaner checkout. 15 snippets
- WooCommerce: account, emails and admin A leaner My account page, handier order lists and emails, and lighter pages. 9 snippets
- More tracking codes Google Ads, TikTok, LinkedIn, Pinterest, Hotjar, Plausible, site verification and a GA4 purchase event. 8 snippets
Library from Snipfire 0.15.1. Written from scratch for Snipfire, free to use on any site. Which plugins can a snippet replace?
Move your snippets over this afternoon.
Importing changes nothing until you switch over, and your old shortcodes keep working.