Divi PHP Code Module
Antivirus scan
Powered by ClamAV
✅ Verified clean
This product file has passed our security filters.
Want to run a fresh ClamAV scan right now? Takes a few seconds and shows scanner version, signature DB and live result.
This can take 5 to 30 seconds.
Clean file Threat detected
No threats detected in this file.
- File
- Size
- Scanned
- ClamAV
- Signature database
⚡ Powered by ClamAV
Scan could not be completed
Report product
If you detected an issue (broken file, malware, inappropriate content, etc.) let us know and we'll review it ASAP.
Sign in to report
About Divi PHP Code Module
Anyone who works with Divi ends up hitting the same wall: you need to show dynamic data at an exact spot on a page (a counter, a table pulled from the database, a custom field), and Divi's code module only takes HTML, CSS and JavaScript. The usual workarounds are creating a child theme, wrapping the PHP in a shortcode or editing templates, all for something that affects a single page.
A Divi module that does run PHP
Divi PHP Code Module adds a dedicated module to the Divi Builder where you write PHP in its settings. When the page loads, the code runs and its output appears exactly where you placed the module, inside whichever section, row or column you choose. You handle it like any other Divi module, and its output accepts Divi's own design settings.
Test and debug without leaving the Visual Builder
Next to the code box there is a green run button: press it and you see in the Visual Builder how the result will look. A debug option also lets you turn error display on or off. If the code fails, the site should not break: it avoids the broken layout or blank screen a PHP error usually causes.
What you can build with it
- Dynamic data: information from WordPress, the database, custom fields or APIs.
- Tables: you load data from a source and output it as a styled HTML table.
- Custom forms: HTML combined with PHP processing logic.
The code is your responsibility
The module restricts who can add code: it only runs PHP entered through the visual builder, which is signed with a cryptographic hash that is checked before it runs, and it respects the permissions in the Divi Role Editor. By default only the administrator can use it; other roles need explicit permission. But what your code does is not limited: if you write something insecure, it will be insecure. Understand every line, avoid accepting user input (or validate it with a whitelist) and escape what you output. And take regular backups.
It can't touch anything that happens before the page
The PHP runs when the module is generated, once WordPress, Divi and the plugins are already loaded. That means you can use their functions and classes, but you are too late to register filters or actions on hooks that fire before page generation starts. Nor does it replace a plugin like Code Snippets:
- The module solves: PHP in a specific place on a Divi page, section, row or layout.
- You cover with another tool: site-wide functionality (with a snippets plugin or a child theme).
- You or a developer cover: writing and reviewing the code, and its security.
Frequently asked questions about Divi PHP Code Module
Can't I put PHP in Divi's standard code module?
No. That module accepts HTML, CSS and JavaScript, but it does not execute PHP.
Do I need to know how to code?
Yes, at least enough to understand the code you paste. The module doesn't write code or police it for you.
Does it work with Divi 4 and Divi 5?
Yes, it is compatible with both.
Can any editor on the site use it?
Not by default: only the administrator. For other roles you must grant permission in the Divi Role Editor.
Is it for adding features to the whole site?
That is not its goal: use a snippets plugin for that. This module is for showing PHP at a specific point in a layout.
Topics
Version history
-
v
1.0.5 Current 8 Apr 2024
Customer reviews
Sign in to leave a review. Only people who have the product can review it.
No reviews for this product yet.
Frequently asked questions
-
GPL (General Public License) is the license under which WordPress and most premium plugins/themes are distributed. It grants you the right to use, modify and redistribute the software in as many projects as you want, with no domain restrictions.
-
Yes. With membership you get automatic updates via our GPLClub Updater plugin (installed on your WP, detects new versions and applies them). With individual purchase, you get one year of manual updates from your account.
-
Depends on the plan. Monthly: 3 domains. Semi-annual: 7. Annual and Lifetime: 15. Individual purchase: 1 domain.
-
GPLClub offers its own support for installation, configuration and compatibility. For direct support from the original author (feature requests, product-specific bugs), a license purchased from the author is required.