From de62e95102220bcf59f4c006c468a9eb4a80fe66 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 27 Sep 2019 11:37:15 +0200 Subject: [PATCH] fix #56 --- includes/class-post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-post.php b/includes/class-post.php index b195bab..7b814d4 100644 --- a/includes/class-post.php +++ b/includes/class-post.php @@ -91,6 +91,9 @@ class Post { $image_ids[] = $attachment->ID; } } + + $image_ids = \array_unique( $image_ids ); + // get URLs for each image foreach ( $image_ids as $id ) { $thumbnail = \wp_get_attachment_image_src( $id, 'full' );