get post type in loop

This commit is contained in:
Antoine M 2023-12-12 14:52:26 +01:00
parent e96e30b588
commit 0f79115ec5

View File

@ -3,6 +3,10 @@
<header class="entry-header mb-4"> <header class="entry-header mb-4">
<?php the_title(sprintf('<h2 class="entry-title text-2xl md:text-3xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?> <?php the_title(sprintf('<h2 class="entry-title text-2xl md:text-3xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?>
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time> <time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
<?php
$post_type = get_post_type();
?>
</header> </header>
<?php if (is_search() || is_archive()) : ?> <?php if (is_search() || is_archive()) : ?>