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

回答編集履歴

1

誤字修正

2020/11/21 00:00

投稿

hiok
hiok

スコア595

answer CHANGED
@@ -12,9 +12,9 @@
12
12
  $posts_array = get_posts( $args );
13
13
  foreach( $posts_array as $post_arr ){
14
14
  $post_id_in_child_cat = $post_arr->ID;
15
- $post_img_url = get_the_post_thumbnail_url( post_id_in_child_cat, 'thumbnail' );
15
+ $post_img_url = get_the_post_thumbnail_url( $post_id_in_child_cat, 'thumbnail' );
16
16
  if( !empty( $post_img_url ) ){
17
- echo '<img src="'.post_img_url.'" alt="'.$category->cat_name.'" />';
17
+ echo '<img src="'.$post_img_url.'" alt="'.$category->cat_name.'" />';
18
18
  }
19
19
  }
20
20