showing post type in search results
This commit is contained in:
parent
0f79115ec5
commit
cda361646f
|
|
@ -1,11 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class('mb-12'); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class('mb-12'); ?>>
|
||||||
|
|
||||||
<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>'); ?>
|
|
||||||
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
|
||||||
<?php
|
<?php
|
||||||
$post_type = get_post_type();
|
$post_type = get_post_type();
|
||||||
|
$post_type_tag = show_post_type_label_name($post_type);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<?php if ($post_type_tag) : ?>
|
||||||
|
<p class="post_type_tag"><?php echo $post_type_tag ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?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>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user