外部コンテンツの横幅

WordPressに外部コンテンツを挿入するときの横幅を指定するには、

//コンテンツの横幅
if ( !isset( $content_width ) ) {

 if( is_mysmartphone() ) {
 $content_width = 320;
 } else {
 $content_width = 960;
 }
}

をfunctions.phpに記述。

※斜字は必要に応じて変更。

コメントを残す