Removes title, meta and top margin when no title is passed to posts or pages. #20.
This commit is contained in:
parent
a9ef9227d0
commit
cd9d388334
|
@ -1,5 +1,6 @@
|
|||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php if ( the_title() != '') : ?>
|
||||
<div class="tainacan-title">
|
||||
<div class="border-bottom border-jelly-bean tainacan-title-page" style="border-width: 2px !important;">
|
||||
<ul class="list-inline mb-1">
|
||||
|
@ -13,6 +14,11 @@
|
|||
<div class="mt-3 tainacan-single-post">
|
||||
<?php get_template_part( 'template-parts/single-post' ); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="mt-0 tainacan-single-post">
|
||||
<?php get_template_part( 'template-parts/single-post' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! is_singular( 'page' ) ) : ?>
|
||||
<div class="row justify-content-between">
|
||||
<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'tainacan-interface' ) ); ?></span>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
|
||||
<?php if ( the_title() != '') : ?>
|
||||
<header class="mb-4">
|
||||
<div class="header-meta text-muted mb-5 d-flex">
|
||||
<?php if ( ! is_singular( 'page' ) ) { ?>
|
||||
|
@ -21,6 +22,7 @@
|
|||
</div>
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<section class="tainacan-content text-black margin-two-column">
|
||||
<?php
|
||||
the_content();
|
||||
|
|
Loading…
Reference in New Issue