Checks if there is at least one link before showing the navigation items.

This commit is contained in:
mateuswetah 2020-07-22 11:32:29 -03:00
parent c92866cae4
commit fbde79d3a9
1 changed files with 11 additions and 9 deletions

View File

@ -95,14 +95,16 @@
}
?>
<div class="tainacan-single-post">
<h2 class="title-content-items"><?php echo __('Also in this collection', 'tainacan-interface') ?></h2>
<div id="item-single-navigation" class="d-flex justify-content-between margin-two-column">
<div class="pagination">
<?php if($previous_link_url !== false) previous_post_link($previous); ?>
</div>
<div class="pagination">
<?php if($next_link_url !== false) next_post_link($next); ?>
<?php if($previous_link_url !== false || $next_link_url !== false): ?>
<div class="tainacan-single-post">
<h2 class="title-content-items"><?php echo __('Also in this collection', 'tainacan-interface') ?></h2>
<div id="item-single-navigation" class="d-flex justify-content-between margin-two-column">
<div class="pagination">
<?php if($previous_link_url !== false) previous_post_link($previous); ?>
</div>
<div class="pagination">
<?php if($next_link_url !== false) next_post_link($next); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>