IT News > トピックス > WordPress > プラグイン > runPHP(記事内でphpを使えるようにする)

記事の中で php を使うには、
runPHP Plugin for WordPress を使う。
他にも類似プラグインあり。

ダウンロード

http://www.nosq.com/blog/runphp/

ユーザーマニュアル

http://www.nosq.com/blog/runphp/runphp-manual/

Download the latest version

Unzip the contents (the entire runPHP directory) into /wp-content/plugins/

In Options > Writing

Turn off “WordPress should correct invalidly nested XHTML automatically”
Do not use this with the visual rich editor

Visit the “Options > runPHP” page to set who can use the plugin (default is Administrators)

Create a post and check the “run PHP code?” checkbox to enable PHP code to be dropped in to your post - this must be set on a per-post basis.

I10n support is available only if WP_LANG is defined in your wp-config.php file.
(English, French, and German are included. You can use POEdit to contribute your own.)

設定

アップがおわったら、管理画面でプラグインを有効化します。

管理画面 - オプション - 投稿設定で「ビジュアルリッチエディタを使用する」「不正な XHTML 構文を自動的に修正する」のチェックを外します。

またビジュアルリッチエディタはユーザー - プロフィールと個人設定の「記事投稿時にビジュアルリッチエディタを使用する」のチェックも外さないと無効になりません。