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
Facebooktwitterredditpinterestlinkedinmail

3 thoughts on “How to add php code to Elementor?”

  1. Thank you very match, this is useful for me. I was need insert php on html but i didn’t know how do it, because elementor doesnt have this widgets. Others articles only says that you should add code on file function php, but this is not necesary with this tutorial. thank you

Leave a Reply to John Cancel reply

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