How to add php code to Elementor?

How to add php code to Elementor WP page builder? It’s easy with plain WP using one of various plugins. But if you are editing WordPress website which is using Elementor, you might have an issue.

Here is how you can do that. It is easy, too, with this solution.

First, install “Insert PHP Code Snippet” plugin.

PHP code wp plugin
PHP code plugin

Then add your code plugin, as “new PHP code snippet”. Don’t include PHP opening and closing tags, paste just the code. Then copy the snippet shortcode.

And finally, paste the shortcode in Elementor using “shortcode widget”.

Elementor shortcode widget
Elementor shortcode widget

3 comments for “How to add php code to Elementor?

Leave a Reply

Your email address will not be published. Required fields are marked *