Code :
function show_file_func( $atts ) {
extract( shortcode_atts( array(
‘file’ => ”
), $atts ) );
if ($file!=”)
return @file_get_contents($file);
}
add_shortcode( ‘show_file’, ‘show_file_func’ );
[show_file file=”example.html”]
[show_file file=”http://www.yahoo.co.jp/”]
WordPressの functions.phpがある場所
WordPressの functions.php
WordPressで少しカスタマイズをしようとする時、説明のページには「functions.phpに下記のソースを追加します。」などと書かれていたりします。
functions.phpがある場所
「外観」-「テーマ編集」-「テーマのための関数(functions.php)」