Fix attachments list on single items
This commit is contained in:
parent
f798839552
commit
6ee1e6df41
|
@ -200,7 +200,7 @@
|
|||
left: -50px;
|
||||
}
|
||||
.single-item-collection--attachments-next {
|
||||
right: 0px;
|
||||
right: -10px;
|
||||
@media only screen and (min-width: 1500px) {
|
||||
right: -25px;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@
|
|||
position: absolute;
|
||||
display: block;
|
||||
height: 33px;
|
||||
width: 18px;
|
||||
width: 45px;
|
||||
line-height: 0px;
|
||||
font-size: 60px;
|
||||
color: #298596;
|
||||
|
|
|
@ -61,9 +61,17 @@
|
|||
<section class="tainacan-content single-item-collection margin-two-column">
|
||||
<div class="single-item-collection--attachments">
|
||||
<?php
|
||||
foreach ( $images as $attachment ) {
|
||||
echo '<div class="single-item-collection--attachments-img">' . wp_get_attachment_image( $attachment->ID, 'tainacan-theme-list-post' ) . '</div>';
|
||||
}
|
||||
foreach ( $images as $attachment ) { ?>
|
||||
<div class="single-item-collection--attachments-img">
|
||||
<a href="<?php echo get_the_permalink( $attachment->ID ); ?>">
|
||||
<?php
|
||||
$image_attributes = wp_get_attachment_image_src( $attachment->ID );
|
||||
if ( $image_attributes ) : ?>
|
||||
<img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue