SOLALIS

functions php

  • HOME »
  • functions php

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)」

任意のファイルを読み込み、その場に実装するWordPressショートコード

PAGETOP
Copyright © http://systemboy.xsrv.jp/solalis All Rights Reserved.
Powered by WordPress & BizVektor Theme by Vektor,Inc. technology.