1
画像の説明を取得
投稿を2列に分割しようとしています。最初と左の1つは投稿内の任意の画像になり、2番目と右の1つはthe_content()(画像を除く)になります。 したがって、現在のところ、すべての画像をプルすることに問題はありません。ただし、画像のキャプション、タイトル、説明を取得できないようです。 私のコードはここにあります: <?php if ( $images = get_posts(array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_mime_type' => 'image', ))) { foreach( $images as $image ) { $attachmenturl = wp_get_attachment_url($image->ID); $attachmentimage = wp_get_attachment_image_src( $image->ID, full ); $imageDescription = apply_filters( 'the_description' , $image->post_content …