wp-73k/content-templates/content-article.php

59 lines
1.3 KiB
PHP
Raw Normal View History

2019-05-23 12:30:31 -04:00
<?php
/**
* The article template.
*
* @author Freeshifter LLC
* @since 1.0.0
*/
namespace WP_73k;
2019-05-23 12:30:31 -04:00
?>
2021-07-06 15:31:46 -04:00
<article class="post border-bottom border-gray pb-4 mb-3" itemscope itemtype="https://schema.org/CreativeWork">
<header>
<h2 class="post-title fs-2 fw-600 mb-2">
<?php
if ( is_archive() || is_home() ) {
printf( '<a href="%s" rel="bookmark">%s</a>',
esc_url( get_the_permalink() ),
esc_html( get_the_title() )
);
} else {
echo get_the_title();
} ?>
</h2>
</header>
</article>
2019-05-23 12:30:31 -04:00
<article <?php post_class( 'bg-white border-2 border-gray-400 p-8' ); ?> itemscope itemtype="https://schema.org/CreativeWork">
2021-07-04 18:16:33 -04:00
<header>
<h2 class="m-0">
<?php
2019-05-23 12:30:31 -04:00
2021-07-04 18:16:33 -04:00
if ( is_archive() || is_home() ) {
printf( '<a href="%s" rel="bookmark">%s</a>',
esc_url( get_the_permalink() ),
esc_html( get_the_title() )
);
} else {
echo get_the_title();
} ?>
</h2>
<p class="text-sm">Published on <?= get_the_date(); ?></p>
</header>
2019-05-23 12:30:31 -04:00
2021-07-04 18:16:33 -04:00
<div class="article">
<?php
if ( has_post_thumbnail() ) {
echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow-lg'] );
}
2019-05-23 12:30:31 -04:00
2021-07-04 18:16:33 -04:00
the_content(); ?>
</div>
2019-05-23 12:30:31 -04:00
2021-07-04 18:16:33 -04:00
<footer>
Categorized under: <?= get_the_category_list( ',' ); ?>
</footer>
2019-05-23 12:30:31 -04:00
</article>