Checks if the_colleciton_url function exists before using it for links.
This commit is contained in:
parent
fa45fc325d
commit
8f876a8f32
|
@ -80,7 +80,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> .page-header-hightlights {
|
> .page-header-hightlights {
|
||||||
margin-top: 30px;
|
margin-top: 24px;
|
||||||
@media only screen and (max-width: 992px) {
|
@media only screen and (max-width: 992px) {
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -620,6 +620,10 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
word-break: break-all;
|
||||||
|
font-size: 0.875em;
|
||||||
|
padding: 0 14px;
|
||||||
|
|
||||||
@media only screen and (max-width: 380px) {
|
@media only screen and (max-width: 380px) {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -31,13 +31,20 @@ 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><a href="<?php tainacan_the_collection_url(); ?>">
|
<h1>
|
||||||
|
<?php if ( function_exists('tainacan_the_collection_url') ): ?>
|
||||||
|
<a href="<?php tainacan_the_collection_url(); ?>">
|
||||||
<?php tainacan_the_collection_name(); ?>
|
<?php tainacan_the_collection_name(); ?>
|
||||||
</a></h1>
|
</a>
|
||||||
|
<?php else : ?>
|
||||||
|
<span><?php tainacan_the_collection_name(); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collection-thumbnail">
|
<div class="collection-thumbnail">
|
||||||
|
<?php if ( function_exists('tainacan_the_collection_url') ): ?>
|
||||||
<a href="<?php tainacan_the_collection_url(); ?>">
|
<a href="<?php tainacan_the_collection_url(); ?>">
|
||||||
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
|
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
|
||||||
$thumbnail_id = get_post_thumbnail_id( $post->ID );
|
$thumbnail_id = get_post_thumbnail_id( $post->ID );
|
||||||
|
@ -52,6 +59,23 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<span>
|
||||||
|
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
|
||||||
|
$thumbnail_id = get_post_thumbnail_id( $post->ID );
|
||||||
|
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?>
|
||||||
|
<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); ?>">
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="image-placeholder rounded-circle border border-white position-absolute">
|
||||||
|
<h4 class="text-center">
|
||||||
|
<?php
|
||||||
|
echo esc_html( tainacan_get_initials( tainacan_get_the_collection_name() ) );
|
||||||
|
?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</span>
|
||||||
|
<?php endif; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue