Links to collection on items single page collection banner. #16.

This commit is contained in:
mateuswetah 2020-04-09 17:11:05 -03:00
parent 140cc349ef
commit bf72df3d06
3 changed files with 22 additions and 15 deletions

View File

@ -44,6 +44,9 @@
color: white; color: white;
margin-bottom: -2px; margin-bottom: -2px;
margin-top: 38px; margin-top: 38px;
a {
color: white;
}
} }
.item-title { .item-title {
display: flex; display: flex;

File diff suppressed because one or more lines are too long

View File

@ -42,24 +42,28 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
<div class="collection-name aside-thumbnail"> <div class="collection-name aside-thumbnail">
<div class="title-page"> <div class="title-page">
<p><?php echo __('Collection', 'tainacan-interface') ?></p> <p><?php echo __('Collection', 'tainacan-interface') ?></p>
<h1><?php tainacan_the_collection_name(); ?></h1> <h1><a href="<?php tainacan_the_collection_url(); ?>">
<?php tainacan_the_collection_name(); ?>
</a></h1>
</div> </div>
</div> </div>
</div> </div>
<div class="collection-thumbnail"> <div class="collection-thumbnail">
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) : <a href="<?php tainacan_the_collection_url(); ?>">
$thumbnail_id = get_post_thumbnail_id( $post->ID ); <?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?> $thumbnail_id = get_post_thumbnail_id( $post->ID );
<img src="<?php echo get_the_post_thumbnail_url( tainacan_get_collection_id() ); ?>" class="t-collection--info-img rounded-circle img-fluid border border-white position-absolute text-left" alt="<?php echo esc_attr($alt); ?>"> $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?>
<?php else : ?> <img src="<?php echo get_the_post_thumbnail_url( tainacan_get_collection_id() ); ?>" class="t-collection--info-img rounded-circle img-fluid border border-white position-absolute text-left" alt="<?php echo esc_attr($alt); ?>">
<div class="image-placeholder rounded-circle border border-white position-absolute"> <?php else : ?>
<h4 class="text-center">search=ful <div class="image-placeholder rounded-circle border border-white position-absolute">
<?php <h4 class="text-center">
echo esc_html( tainacan_get_initials( tainacan_get_the_collection_name() ) ); <?php
?> echo esc_html( tainacan_get_initials( tainacan_get_the_collection_name() ) );
</h4> ?>
</div> </h4>
<?php endif; ?> </div>
<?php endif; ?>
</a>
</div> </div>
<?php <?php
global $wp; global $wp;