-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
executable file
·74 lines (64 loc) · 1.57 KB
/
page.php
File metadata and controls
executable file
·74 lines (64 loc) · 1.57 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* Page template file.
*
* Renders single static pages and page-specific layout sections.
*
* @package tailwind_wordpress_template
* @since 1.0.0
*/
if (!defined('ABSPATH')) {
exit;
}
get_header();
?>
<main
id="main"
class="site-main">
<?php
$hero_thumbnail_url = '';
$page_id = get_queried_object_id();
if ($page_id && has_post_thumbnail($page_id)) {
$hero_thumbnail_url = get_the_post_thumbnail_url($page_id, 'full');
}
get_template_part('template-parts/content-page-hero', null, array(
'thumbnail_url' => $hero_thumbnail_url,
'title' => get_the_title(),
));
?>
<div class="container max-w-4xl mx-auto px-4 py-12">
<div class="flex flex-col md:flex-row gap-8">
<div class="flex-1">
<?php
while (have_posts()) :
the_post();
?>
<article
id="post-<?php the_ID(); ?>"
<?php post_class('mb-8'); ?>>
<div class="entry-content prose max-w-none">
<?php
the_content();
wp_link_pages(array(
'before' => '<div class="page-links mt-6">' . __('Pages:', 'tailwind_wordpress_template'),
'after' => '</div>',
));
?>
</div>
</article>
<?php
if (tailwind_wordpress_template_should_show_comments()) {
comments_template();
}
?>
<?php
endwhile;
?>
</div>
<?php //get_sidebar(); ?>
</div>
</div>
</main>
<?php
get_footer();
?>