- There are two ways to add PHP to a WordPress post from the editor. ...
- Then, navigate to the PHP Code Snippets section under the plugin's menu.
- Click “Add New PHP Code Snippet”.
- Here, you can make your snippet. ...
- Simply add the code you want in this snippet in the text box, then click create.