Execute php in posts [WordPress]

The PHP code that I have added in these posts, here and here aren’t a PHP code added in the post, instead they are managed in their control panel and only a short code is added in the post body.

php-in-wordpress-post-short-code

When you take a look at the post body you see short codes within [ and ] brackets such as [example]. I cant paste the same short code here as it would execute. So that’s how you add a link to your php code that is written and managed all stored in the database.

The plugin

Though, there are so many execute php plugins, I prefer Shortcode Exec PHP plugin. The plugin is regularly updated, maybe not every month but when new WordPress update rolls out those kind of changes. You can manage your php code snippets on the plugin settings page, found under Tools on your WordPress admin dashboard, as shown below,

short-code-exec-php-settings

Leave a Reply

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