- .htaccess
- 404エラー
- All-in-One WP Migration
- API Key
- background
- Bootstrap4
- border
- Canonet
- Contact Form 7
- Contact Form7
- css
- Easy FancyBox
- fixed
- flex
- font
- Font−family
- googlemap
- header.php
- Intuitive Custom Post Order
- Lightbox
- MW WP Form
- ol
- PHP
- reCAPTCHA
- SSL
- SVG
- text-shadow
- the_content
- wordpress削除
- youtube
- アイキャッチ
- アコーディオン
- アコーディオンメニュー
- アニメーション
- アンカーリンク
- エックスドメイン
- エディター
- エフェクト
- カスタムフィールド
- カテゴリー
- カラー
- カレント
- かんたんインストール
- サーバー移行
- さくらのレンタルサーバー
- スクロール
- スパムメール
- スムーススクロール
- タグ
- ツイッター
- データベース
- ドメイン
- ドメイン移管
- トリミング
- ドロップダウン
- にゅるっと
- ネームサーバー
- パーミッション
- パスワード保護
- バックアップ
- ハンバーガー
- ハンバーガーメニュー
- ファイルサイズ
- フォント
- プレビュー
- マウスオーバー
- ムームー
- ラベル
- リスト
- リスト横並び
- リダイレクト
- レスポンシブ
- ローディング
- ロリポップ
- 並び替え
- 名刺
- 固定ページ
- 投稿記事
- 投稿詳細ページ
- 擬似クラス
- 文字制限
- 条件分岐
- 無料のレンタルサーバー
- 背景画像
- 記事一覧
- 記事一覧ページ
- 記事詳細ページ
リピート
1 2 3 4 5 6 7 |
<?php if(have_rows('aaa_field')): ?> <?php while(have_rows('aaa_field')): the_row(); ?> <li> <?php the_sub_field('aaa-01'); ?> </li> <?php endwhile; ?> <?php endif; ?> |
リピートの中にリピート
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?php if(get_field('aaa_field')): ?> <?php while(have_rows('aaa_field')): the_row(); ?> <li> <?php the_sub_field('aaa-tex'); ?> <ul class="sitemap-List2"> <?php if(have_rows('bbb_field')): ?> <?php while(have_rows('bbb_field')): the_row(); ?> <li> <?php the_sub_field('bbb-tex'); ?> </li> <?php endwhile; ?> <?php endif; ?> </ul> </li> <?php endwhile; ?> <?php endif; ?> |
画像
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<ul class=""> <?php if( have_rows('about-field') ): ?> <?php while( have_rows('about-field') ): the_row(); $image = get_sub_field('about-phot'); ?> <li class="clearfix"> <div class="leftBox"> <h3><?php the_sub_field('about-title'); ?></h3> <p> <?php the_sub_field('about-tex'); ?> </p> </div> <div class="rightBox"> <div class="photaria"> <img src="<?php echo $image['url']; ?>"/> </div> </div> </li> <?php endwhile; ?> <?php endif; ?> </ul> |
ファイル
1 2 3 4 5 6 7 8 9 10 11 |
<ul> <?php if( have_rows('zaimu-field') ): ?> <?php while( have_rows('zaimu-field') ): the_row(); $file = get_sub_field('zaimu-pdf'); ?> <li> <a href="<?php echo $file['url']; ?>" target="_blank"><?php the_sub_field('filename'); ?></a> </li> <?php endwhile; ?> <?php endif; ?> </ul> |
未入力の項目は表示させない
1 2 3 4 5 6 7 8 9 |
<?php if(have_rows('plansfield02')): ?> <?php while(have_rows('plansfield02')): the_row(); ?> <li> <?php the_sub_field('plans02'); ?> </li> <?php endwhile; ?> <?php else: ?> <!-- 入力が無い場合の処理 --> <?php endif; ?> |
項目ごと
1 2 3 4 5 |
<?php if( get_sub_field('recruitphoto01') ): ?> <div class="trimming-phot_70"> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> </div> <?php endif; ?> |
枠ごと
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?php if(get_field('faq_field')): ?> <div class="mb-box"> <h3 class="left__accent">よくある質問</h3> <ul class="faq-list"> <?php if(have_rows('faq_field')): ?> <?php while(have_rows('faq_field')): the_row(); ?> <li> <div class="q-box"> <?php the_sub_field('faq_q'); ?> </div> <div class="a-box"> <?php the_sub_field('faq_a'); ?> </div> </li> <?php endwhile; ?> <?php endif; ?> </ul> </div> <?php else: ?> <!-- 入力が無い場合の処理 --> <?php endif; ?> |