Smart Custom Fields

スポンサーリンク
WordPress

[Smart Custom Fields]WYSIWYGにフォントサイズボタンを表示させる方法

Smart Custom FieldsのWYSIWYG(ビジュアルエディタ)ツールバーには、初期設定でフォントサイズの変更ボタンがありません。 フォントサイズを変えたい場合は、プラグイン内のeditor-wysiwyg.jsファイルを変更し...
WordPress

[WordPress]他の固定ページで使ってるSCFのフィールドを取得

Smart Custom Fieldsで他の固定ページのフィールドを取得 ページID=2のフィールドの表示 <?php $field = SCF::get(カスタムフィールド名,2); echo $field; //テキスト echo nl...
WordPress

[WP]Smart Custom FieldsのWYSIWYGでpタグや改行を反映させなかったり反映させたり

WYSIWYGでpタグや改行を反映させない <?php echo sanitize_text_field($fields); ?> WYSIWYGでpタグや改行を反映させる <?php echo nl2br($fields); ?>
WordPress

[WordPress]Smart Custom Fieldsで値の有無による条件分岐

テンプレートファイル <?php if(get_post_meta($post->ID, 'フィールド名', true)): ?> //値がある場合に表示する内容 <?php echo SCF::get('フィ...
WordPress

[Smart Custom Fields]管理画面上の画像の表示サイズを変更する方法

functions.php function add_admin_style() { if ( in_array( get_post_type(), array( 'カスタム投稿名', ) )){ echo ' <style> .smart...
WordPress

[Smart Custom Fields]フィールドが空であれば表示させない条件分岐

フィールドが空であれば表示させない条件分岐 <?php $group_field = SCF::get( 'グループ名' ); foreach ( $group_field as $field_name => $field_value) {...
WordPress

[WordPress]Smart Custom Fieldsの繰り返しグループで画像情報を出力

SCFの繰り返しグループで画像の出力 <?php $field = SCF::get('グループ名'); foreach ($field as $fields) { $images = wp_get_attachment...
WordPress

[WordPress]Smart Custom FieldsのWYSIWYGでショートコードを出力

SCFでのWYSIWYGでショートコードを出力 <?php  $field = SCF::get(‘カスタムフィールド名’);  echo do_shortcode($field); ?>
WordPress

[WordPress]Smart Custom Fieldsのフィールド情報出力まとめ

テキスト <?php  $field = SCF::get('カスタムフィールド名');  echo $field; //テキスト  echo nl2br($field); //改行保持 ?> 画像IMGタグ <?php...
スポンサーリンク