Hello,
I got this code in a template:
<?php
$images = get_field('my_gallery');
$size = 'thumbnail'; // (thumbnail, medium, large, full or custom size)
if( $images ): ?>
<ul>
<?php foreach( $images as $image_id ): ?>
<li>
<?php echo wp_get_attachment_image( $image_id['ID'], $size ); ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
That displays gallery attachements in archive and single display.
Because I would like to avoid modifying template, could you please advise of how to turn it into a hook or filter, that would place this code before “read more” link (but after rest of content) or if not possible right after it on archive display?