/* PHPの読み込み
---------------------------------------------------------- */
function my_php_Include($params = array()) {
extract(shortcode_atts(array('file' => 'default'), $params));
ob_start();
include(STYLESHEETPATH . "/$file.php");
return ob_get_clean();
}
add_shortcode('call_php', 'my_php_Include');ショートコード
[call_php file=’●●●●●’]
DUB DESiGN


プラグインなしでページ内にPHPを読み込む方法
ショートコードでphpを記述できる仕様にすることで、固定ページや投稿ページ、ウィジェット、メニューなど、Wordpress内の好きな場所にphpを設置する事ができます。 今回は...
