常规方式调用 if ( $gallery = get_post_gallery( get_the_ID() ) ) : echo $gallery; endif; 调用循环中的所有图片并可以自字义样式 if ( $gallery = get_post_gallery( get_the_ID(), false ) ) : foreach ( $gallery['src'] AS $src ) { echo '<img src="' . $src . '" class="my-custom-…
常规方式调用 if ( $gallery = get_post_gallery( get_the_ID() ) ) : echo $gallery; endif; 调用循环中的所有图片并可以自字义样式 if ( $gallery = get_post_gallery( get_the_ID(), false ) ) : foreach ( $gallery['src'] AS $src ) { echo '<img src="' . $src . '" class="my-custom-…