Description
Dynamic Number Insertion (DNI) allows you to automatically replace phone numbers across your WordPress site based on the page URL. Perfect for businesses with multiple locations, marketing campaigns with unique tracking numbers, or any situation where you need different phone numbers on different pages.
The plugin intelligently detects various phone number formats and replaces them consistently throughout the entire page – including headers, footers, widgets, and content areas. It works seamlessly with your existing theme and plugins, requiring no code modifications.
Phone numbers are replaced before the page loads, ensuring compatibility with call tracking services like CallRail and other JavaScript-based tracking solutions.
Key Features:
✅ Automatic phone number format detection (handles parentheses, dashes, dots, spaces)
✅ URL-based replacement rules for precise targeting
✅ Works everywhere – headers, footers, widgets, menus, and content
✅ Compatible with page builders and themes
✅ No coding required – simple dashboard interface
✅ Preserves SEO and tracking scripts
✅ Lightweight and performance-optimized
Use Cases:
- Multi-location businesses – Show local phone numbers on location-specific pages
- Landing pages – Use unique tracking numbers for different marketing campaigns
- A/B testing – Test different phone numbers to measure conversion rates
- Franchises – Let each franchise location have their own contact number
- Service area pages – Display area-specific phone numbers automatically
Installation
- Upload the plugin files to
/wp-content/plugins/dynamic-number-insertion/ - Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to Settings Phone Manager
- Add your first rule by entering:
- Original Number (the number currently on your site)
- Replacement Number (the number you want to display)
- URL/Page (the specific page where replacement should occur)
- Click “Add Rule” and the replacement will be active immediately
FAQ
-
How does the plugin detect phone numbers?
-
The plugin automatically detects common phone number formats including:
– (555) 123-4567
– 555-123-4567
– 555.123.4567
– 5551234567
– +1-555-123-4567
And many other variations with or without country codes, parentheses, spaces, and separators. -
Will this work with my theme?
-
Yes! The plugin works at the output level, capturing and modifying the final HTML before it’s sent to the browser. This means it works with any theme or page builder.
-
Does it work with call tracking services like CallRail?
-
Yes. The phone number replacement happens during PHP processing, before the page loads in the browser. This means JavaScript-based call tracking services can still function normally on top of the replaced numbers.
-
Can I use multiple rules for the same page?
-
The plugin uses exact URL matching, and the most specific rule takes priority. Each URL can have one active rule at a time.
-
Will this slow down my site?
-
No. The plugin is highly optimized and uses efficient output buffering. The replacement process adds minimal overhead (typically less than a few milliseconds per page load).
-
Can I target specific pages or posts?
-
Yes. Enter the exact URL path for any page, post, or custom post type. For example:
–/contact/for your contact page
–/locations/austin/for a specific location page
–/landing/campaign-1/for a marketing landing page -
Does it work with phone numbers in images?
-
No, the plugin only replaces text-based phone numbers. Phone numbers embedded in images cannot be dynamically replaced.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Dynamic Number Insertion” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Dynamic Number Insertion” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.2
Updated icons
1.0.1
- Added uninstall.php file to properly clean up plugin data (options) when the plugin is deleted.
- Improved sanitization and validation of user inputs in the admin settings page for better security.
- Minor code cleanup and consistency fixes in admin and replacer classes.
1.0.0
- Initial release
- URL-based phone number replacement rules
- Automatic format detection for phone numbers
- Support for headers, footers, widgets, and content areas
- Simple dashboard interface for managing rules
- Compatible with call tracking services
- Intelligent detection of phone number variations
- Works with any theme or page builder
