Weitere ähnliche Inhalte
Ähnlich wie カスタムフィールドで作るカンタン投稿システム (20)
Kürzlich hochgeladen (11)
カスタムフィールドで作るカンタン投稿システム
- 4. WordPress にも Jimdo や
a-blog cms のようなウィジェットを選んで
記事を作れる機能があったらいいのにな…
WordPress にも Jimdo や
a-blog cms のようなウィジェットを選んで
記事を作れる機能があったらいいのにな…
- 7. プラグインの購入方法&ダウンロードプラグインの購入方法&ダウンロード
Advanced Custom Fields プラグインの
公式サイトへ行き、Repeater Field と
Flexible Content Field を購入します。
(購入時にアカウント登録します)
http://www.advancedcustomfields.com/
購入ができたら、登録したアカウントでログインし、マイページの
購入履歴ページから、有料プラグインのファイルがダウロードできます。
ダウンロードすると、以下の zip ファイルができます。
・acf-flexible-content.zip
・acf-repeater.zip
1
2
3
- 12. 記述の仕方記述の仕方
<?php while(the_flexible_field(" フィールド名 ")): ?>
<?php if(get_row_layout() == " パーツごとのフィールド名 "): ?>
<?php the_sub_field(" パーツごとのサブフィールド名 "); ?>
<?php elseif(get_row_layout() == " パーツごとのフィールド名 "): ?>
<?php the_sub_field(" パーツごとのサブフィールド名 "); ?>
<?php the_sub_field(" パーツごとのサブフィールド名 "); ?>
<?php elseif(get_row_layout() == " パーツごとのフィールド名 "): ?>
<?php the_sub_field(" パーツごとのサブフィールド名 "); ?>
1 パーツ
1 パーツ
1 パーツ
<?php endif; ?>
<?php endwhile; ?>
・
・
・
・