Simon
Simon

Reputation: 9

What's the best WordPress plugin for embedding/executing PHP code?

I have an existing webapp created in PHP and would like to embed some of the PHP code into some WordPress pages.

What's the best WordPress plugin for that?

Upvotes: 0

Views: 3164

Answers (2)

Brad
Brad

Reputation: 525

A lot of folks use EXEC-PHP. The Exec-PHP plugin executes code in your posts, pages and text widgets. One drawback may be that you will have to disable the WYSIWYG Editor but most people do that anyway.

Upvotes: 1

cowbellemoo
cowbellemoo

Reputation: 425

Pasting PHP code into a plugin isn't a good idea. There are three approaches to embedding PHP scripts into a WordPress site:

  • Placing the code directly into a theme's main index template (messy)

  • Placing the code into a theme's functions.php file and hooking it into the site using the Plugin API. (cleaner)

  • Fully encapsulating the code in a plugin. (cleanest)

Upvotes: 2

Related Questions