WordPress hält hochgeladene Bilder als Anhänge, die wirklich nur untergeordnete Beiträge von post_type 'Anhang' in der Tabelle wp_posts sind.
Laden Sie Ihre Bilder auf der Seite/Post/benutzerdefinierte Beitragstyp in Frage (Das Upload-Symbol über dem Editor) und eine "Galerie" wird erstellt.
Um die Fotos anzuzeigen, können Sie ein Widget und eine Seitenleiste erstellen (siehe here und here) oder sie direkt in der Schleife Ihrer Wahl mit dem folgenden Code anzeigen. Dies ist im Wesentlichen das gleiche wie die Verwendung der [gallery] shortcode direkt im Post-Inhalt.
<?php
//Gather the child posts (attachments) of mime type 'image'
$photos = get_children(array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image'));
//If there are any attachments..
if (!empty($photos)) :
//Loop through each attachment..
foreach ($photos as $photo_id => $photo) :
//And render the <img> tag
echo wp_get_attachment_image($photo_id, 'full') ;
endforeach ;
endif ;
?>