2021-07-25 07:16:35 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The article template.
|
|
|
|
*
|
|
|
|
* @author Recovery Dharma NYC
|
|
|
|
* @since 1.0.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace WP_RDNYC;
|
|
|
|
|
|
|
|
?>
|
2021-07-28 16:39:40 -04:00
|
|
|
<article
|
|
|
|
<?php
|
|
|
|
$extra_post_class = is_singular() ? '' : ' mb-two-rem';
|
2021-07-28 19:05:47 -04:00
|
|
|
echo post_class( 'post border-bottom border-spaceblue-700 pb-4' . $extra_post_class );
|
2021-07-28 16:39:40 -04:00
|
|
|
?>
|
2021-07-28 12:20:00 -04:00
|
|
|
itemscope itemtype="https://schema.org/CreativeWork">
|
|
|
|
|
2021-07-27 19:12:18 -04:00
|
|
|
<header class="post-header">
|
2021-07-25 07:16:35 -04:00
|
|
|
<?php
|
2021-07-28 19:05:47 -04:00
|
|
|
echo (is_page() ? '<h1 class="post-title fw-light text-gray-300 mb-4 border-bottom border-dashed border-spaceblue-600">'
|
2021-07-28 16:39:40 -04:00
|
|
|
: '<h2 class="post-title fs-2 fw-600 mb-2">');
|
|
|
|
|
|
|
|
if ( is_archive() || is_search() || is_home() ) :
|
2021-07-25 07:16:35 -04:00
|
|
|
printf( '<a href="%s" rel="bookmark">%s</a>',
|
|
|
|
esc_url( get_the_permalink() ),
|
|
|
|
esc_html( get_the_title() )
|
|
|
|
);
|
2021-07-28 16:39:40 -04:00
|
|
|
else : echo esc_html( get_the_title() );
|
|
|
|
endif;
|
|
|
|
|
|
|
|
echo (is_page() ? '</h1>' : '</h2>');
|
|
|
|
?>
|
2021-07-25 07:16:35 -04:00
|
|
|
|
2021-07-28 16:39:40 -04:00
|
|
|
<?php if (!is_page()) : ?>
|
2021-07-27 19:12:18 -04:00
|
|
|
<div class="post-date text-gray-400 mb-3" style="margin-top: -.33rem;">
|
|
|
|
<!-- inline_svg( 'bsi-clock', array( 'div_class' => 'icon baseline me-2' ) ) . -->
|
2021-07-28 16:39:40 -04:00
|
|
|
<?php
|
|
|
|
if (get_the_title() === '') {
|
|
|
|
echo '<a href="' . esc_url( get_the_permalink() ) . '" rel="bookmark">';
|
|
|
|
}
|
|
|
|
echo get_the_date('F j, Y');
|
|
|
|
if (get_the_title() === '') {
|
|
|
|
echo '</a>';
|
|
|
|
}
|
|
|
|
?>
|
2021-07-25 07:16:35 -04:00
|
|
|
</div>
|
2021-07-28 16:39:40 -04:00
|
|
|
<?php endif; ?>
|
2021-07-25 07:16:35 -04:00
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div class="article post-body">
|
|
|
|
<?php
|
2021-07-28 16:39:40 -04:00
|
|
|
if ( has_post_thumbnail() ) {
|
|
|
|
echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow mb-3 mw-100 h-auto'] );
|
|
|
|
}
|
2021-07-25 07:16:35 -04:00
|
|
|
|
2021-07-28 16:39:40 -04:00
|
|
|
the_content();
|
|
|
|
|
|
|
|
wp_link_pages(
|
|
|
|
array(
|
|
|
|
'before' => '<nav class="d-flex justify-content-center" aria-label="Page navigation for post ' . get_the_title() . '"><div class="d-flex align-items-center pe-2">Post pages:</div><div class="pagination">',
|
|
|
|
'after' => '</div></nav>',
|
|
|
|
'link_before' => '<span class="page-link">',
|
|
|
|
'link_after' => '</span>'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
2021-07-25 07:16:35 -04:00
|
|
|
</div>
|
2021-07-28 16:39:40 -04:00
|
|
|
|
2021-07-25 07:16:35 -04:00
|
|
|
</article>
|