質問するログイン新規登録

質問編集履歴

2

誤字

2016/10/13 11:39

投稿

may88seiji
may88seiji

スコア79

title CHANGED
File without changes
body CHANGED
@@ -16,10 +16,10 @@
16
16
  <?php if(have_rows('profile')): ?>
17
17
  <?php while(have_rows('profile')): the_row();
18
18
  //vars
19
- $image = the_sub_field('profile_image');
19
+ $image = get_sub_field('profile_image');
20
- $name = the_sub_field('profile_name');
20
+ $name = get_sub_field('profile_name');
21
- $status = the_sub_field('profile_status');
21
+ $status = get_sub_field('profile_status');
22
- $bio = the_sub_field('profile_bio');?>
22
+ $bio = get_sub_field('profile_bio');?>
23
23
  <div><img class="profile_img" src="<?php echo $image; ?>" alt="profile01" /></div>
24
24
  <div class="profile_detail">
25
25
  <?php if( $name ): ?><p class="name padding_top_8 fz_13"><?php the_sub_field('profile_image'); ?></p>

1

追記しました。

2016/10/13 11:39

投稿

may88seiji
may88seiji

スコア79

title CHANGED
File without changes
body CHANGED
@@ -1,13 +1,16 @@
1
1
  ###前提
2
2
  htmlをwordpressにてcms化しています。
3
3
 
4
-
4
+ エラー状況
5
+ カスタムフィールドの内容が反映されない
5
6
  ###実現したいこと
6
7
  WordPress ACF Repeaterの利用
7
8
  profile_img name status bio を
8
9
  php での置き換えを教えていただければと思います。
9
10
 
10
11
  ###試したこと
12
+ 参考にしたサイト
13
+ https://www.advancedcustomfields.com/resources/repeater/
11
14
  ```php
12
15
  <div class="profile margin_bottom_20">
13
16
  <?php if(have_rows('profile')): ?>