This repository was archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
41 lines (34 loc) · 1.27 KB
/
Copy pathsingle.php
File metadata and controls
41 lines (34 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( wp_is_mobile() ) {
$img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large', false, '' ); } else {
$img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full', false, '' ); } ?>
<div class="single">
<div class="full-container">
<?php if ( has_post_thumbnail() ) : ?>
<div class="absolute inset-0">
<img class="h-full w-full object-cover" src="<?php echo $img[0]; ?>" alt="">
<div class="absolute inset-0 opacity-50 bg-black"></div>
</div>
<?php endif; ?>
<div class="relative py-32 lg:py-60">
<div class="site-container">
<article class="lead text-white">
<h1><?php the_title(); ?></h1>
<p><time datetime="<?php the_time('F jS, Y'); ?>">
<?php the_time('F jS, Y'); ?>
</time></p>
</article>
</div>
</div>
</div>
</div>
<div class="site-container py-10">
<div class="max-w-prose mx-auto">
<article id="post-<?php the_ID(); ?>" <?php post_class('single-content'); ?>>
<?php the_content(); ?>
</article>
</div>
</div>
<?php endwhile; endif; ?>
<?php get_footer();