Я использую "Дополнительные пользовательские поля", и я создал страницу архива для отображения сообщений из настраиваемого типа сообщений "property_sales"
это полный шаблон
<article <?php post_class(); ?>>
<header>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</header>
<div class="location">
<?php the_field('location')?>
</div>
<div class="photoframe">
<a href="sales"><img class="responsive" src="<?php the_field('property_image')?>" /></a>
</div>
<div class="price">£
<?php the_field('price')?>
</div>
<div class="entry-summary">
<p>Added on <?php get_template_part('templates/property-meta'); ?></p>
</div>
<div class="rightmovelink">
<a href="<?php the_field('link')?>" target="_new">View Full Listing</a>
</div>
<div class="clear">
</article>
Мне было интересно, какой код мне нужно поместить в тег, чтобы связать с сообщением, с которым связано каждое изображение?
Попробуй это
<div class="photoframe">
<a href="<?php the_permalink(); ?>"><img class="responsive" src="<?php the_field('property_image')?>" /></a>
</div>