Code with Toofan Developer
Essential Code Snippet For Web Developers
This is not a good idea to write all code from scratch & it makes the development time longer. That is why I put all my most valuable and complex code here so I can reuse it and at the same time other developers can.
TOP Code SNIPPETS
Sort Posts Dropdown in WordPress: Newest, Oldest, Title (Easy & Safe Code)
Add a safe sort posts dropdown in WordPress for newest, oldest, title or most comments, without a plugin.
View codeCopy Link to Clipboard in WordPress: Easy Share Button in 3 Steps
Add a copy link to clipboard button in WordPress without a plugin, with a mobile Share button.
View codeElementor Loop Grid Order By ACF Date Field (Upcoming Events First)
Quick answer: For an Elementor Loop Grid order by ACF date field, give the Loop Grid a Query ID (for example dd_event_date) and hook into elementor/query/dd_event_date to set meta_key to your field and orderby to meta_value_num. ACF saves Date Picker values as Ymd, so numeric sorting puts the soonest date first. I use this on […]
View codeCreate a WordPress Admin User via functions.php or WP-CLI (Safe Method)
Quick answer: To create a WordPress admin user when you are locked out of wp-admin but still have FTP, file manager or SSH access, use WP-CLI or a short functions.php snippet. The safest options are WP-CLI or a one-time snippet that sends a password-reset email instead of storing a password in your code. Remove the […]
View codeBlock Email Domains in Fluent Forms: 2 Easy PHP Snippets
Block email domains in Fluent Forms on all forms or selected forms with two easy PHP snippets.
View codeAdd Custom Post Type to Search Results and Filter by ACF Field (2 Ways)
Add custom post types to WordPress search results and filter them by an ACF field.
View codeElementor Open Tab on Link Click: Tabs, Accordion & Toggle (No Plugin)
Quick answer: To make Elementor open tab on link click, give the tab or accordion title an ID, link to it with #your-id, and add the small JavaScript below to the page. When someone opens example.com/page/#your-id or clicks a #your-id link on the same page, the script opens that item and scrolls to it. No […]
View codeACF Code Snippets: 6 Essential Examples (Link, Gallery, Repeater & More)
Six essential ACF code snippets for custom WordPress themes, safe and ready to paste.
View codeDisable Payment Gateway by Country in WooCommerce (2 Easy Snippets)
Disable payment gateway by country in WooCommerce with two simple PHP snippets.
View codejQuery Tabs Next Prev Button: Step-by-Step Form with Bootstrap Tabs
Add Next and Previous buttons to Bootstrap tabs with jQuery, plus a Bootstrap 5 version.
View codejQuery Cookie Popup: Show a Popup Once Per Day (Easy 3-Step Snippet)
A jQuery cookie popup that shows once per day: HTML, CSS and jQuery for WordPress.
View codeBest Web Developer in Bangladesh: How to Find the Top Talent for Your Business
Quick answer: The best web developer in Bangladesh for your business is a specialist who asks about your goals before writing code, shows live work and real client reviews, and agrees a fixed scope and price. Avoid very cheap template sellers, pay 50% upfront and 50% on completion, and expect 3 to 6 weeks for […]
Read articleWeb App Development Cost in 2026: 7 Things That Really Drive the Price
How web app development cost is really calculated in 2026: the seven price drivers, how to estimate your own project and how to keep the budget under control.
View codeCustom WordPress Theme Development Services: What You Get and What It Costs
What custom WordPress theme development includes, when it is worth the money, my process and what it costs, written by a working WordPress developer.
View codeInvoice Software for Small Business: Should You Build or Buy?
Buy, self-host or build? An honest guide to choosing invoice software for a small business, with a side-by-side comparison and a simple way to decide.
View codeAI Chatbot for WordPress: Free vs Paid, and Which One You Need
Free vs paid AI chatbot for WordPress: how each option works, where visitor data goes, and the setup I use to turn chats into leads.
View codeCustom WordPress Plugin Development: When You Need One and What It Costs
When a custom WordPress plugin is worth it, when it is not, how a secure plugin is built and what changes the cost.
View codeSteadfast Courier WooCommerce Integration: Book Parcels From Your Orders Page
How to connect Steadfast courier to WooCommerce: one-click and bulk parcel booking, API keys, delivery status webhook and the checkout fixes that matter.
View codeRestaurant Online Ordering System: How to Set Up Your Own Without Commission
How to set up your own restaurant online ordering system on WordPress: menu, pickup and delivery, payments, kitchen alerts and no commission.
View codeAI Agent for WordPress: What It Can Do and How to Add One to Your Site
What an AI agent for WordPress can really do, the three ways to add one (chatbot plugin, MCP, custom plugin) and the safety mistakes to avoid.
View codeWooCommerce to Shopify Migration: A Step-by-Step Plan That Keeps Your SEO
My step-by-step plan for a WooCommerce to Shopify migration: what moves, import apps, redirects and how to keep your Google rankings.
View codeHow to Speed Up an Elementor Website: 9 Fixes That Actually Work
How I speed up an Elementor website for clients: performance settings, containers, fewer add-ons, images, fonts, caching and delayed scripts.
View codeWordPress Website Redesign: 7 Signs You Need One and What It Costs
Seven signs you need a WordPress website redesign, what a refresh, redesign or rebuild costs, and how to redesign without losing your Google rankings.
View codeMuse AI Free Token: ফ্রিতেই ৩০ বিলিয়ন টোকেন ও আনলিমিটেড টোকেন নিতে পারবেন
সংক্ষেপে উত্তর: Muse AI free token পেতে Telegram-এর MuseBoostBot স্টার্ট করুন, চ্যানেল জয়েন করে ভেরিফাই করুন, তারপর আপনার Muse অ্যাকাউন্টের Invite Code বটে রিডিম করুন। প্রতি ১ ক্রেডিটে প্রায় ১ বিলিয়ন টোকেন যোগ হয়। Daily Check-in আর রেফারেল দিয়ে ক্রেডিট বাড়ানো যায়। আসসালামু আলাইকুম। আশা করি সবাই ভালো আছেন। AI দিয়ে যারা নিয়মিত কাজ করেন, […]
View codebKash Payment Gateway in WooCommerce: How to Add bKash, Nagad and Cards
How to add a bKash payment gateway to WooCommerce: manual vs direct vs aggregator, what you need, setup steps and the mistakes I see on real stores.
View codeWooCommerce Automation in 2026: 9 Tasks Every Store Should Stop Doing by Hand
Nine WooCommerce automation tasks that save stores the most time, and how to set each one up with built-in settings, a plugin or n8n.
Read articlen8n WordPress Automation: 7 Workflows That Save Small Businesses Hours Every Week
Seven n8n WordPress and WooCommerce automations that save small businesses hours: order alerts, AI lead triage, review requests, reminders, social sharing, AI drafts and weekly reports.
Read articleACF Gutenberg Blocks: How to Build Custom Blocks With block.json
Build custom ACF Gutenberg blocks with block.json in 4 steps: folder, registration, fields and a PHP template, with copy-paste code.
Read articleFigma to Elementor: How to Convert a Figma Design Step by Step
My Figma to Elementor workflow in 7 steps: globals, containers, templates, breakpoints and speed, plus costs and timelines.
Read articleWordPress Maintenance Checklist: Weekly, Monthly and Yearly Tasks
The WordPress maintenance routine I use for client sites: weekly, monthly, quarterly and yearly tasks that prevent hacks, slowdowns and broken forms.
Read article
These WordPress code snippets come from real client work. Each one solves a problem I hit on a live site, and each post explains what the code does, where to paste it and how to test it safely. No copy-paste from forums without checking.
Browse WordPress code snippets by topic
- ACF snippets: repeaters, galleries, links, search by custom fields
- Elementor snippets: open tabs from links, order Loop Grids by ACF date
- PHP and WooCommerce snippets: payment gateways by country, admin users, form rules
- jQuery snippets: tabs, cookie popups, copy-to-clipboard buttons
Popular snippets
- ACF code snippets: 6 essential examples
- Disable a WooCommerce payment gateway by country
- Elementor: open a specific tab from a link
- Create a WordPress admin user from functions.php
- ACF Gutenberg blocks with block.json
Before you paste any code
Always take a backup, use a child theme or a code snippets plugin, and test on a staging copy first. If you would rather not touch code, send me the problem and I will fix it for you. The official WordPress code reference is also a good place to check any function.
