-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
64 lines (55 loc) · 1.42 KB
/
index.php
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
<?php get_header(); ?>
<main id="main">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (is_single() || is_page()) : ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<?php the_category(); ?>
<h1><?php the_title(); ?></h1>
<p><?php the_author(); ?></p>
<p><?php the_date(); ?></p>
</header>
<div>
<?php the_content(); ?>
</div>
<footer>
<?php the_tags(); ?>
</footer>
</article>
<?php else : ?>
<?php if (is_search()) : ?>
<h1>Search results for <?php the_search_query(); ?>:</h1>
<?php endif; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<figure><?php the_post_thumbnail(); ?></figure>
<a href="<?php the_permalink(); ?>">
<h2><?php the_title(); ?></h2>
</a>
<p><?php the_author(); ?></p>
<p><?php the_date(); ?></p>
</header>
<div>
<?php the_excerpt(); ?>
</div>
</article>
<?php endif; // end content
endwhile; // close the loop
?>
<?php else : ?>
<?php if (is_404()) : ?>
<p>Sorry, we couldn't find your page.</p>
<?php endif; ?>
<?php endif; ?>
<?php get_template_part(
'template-parts/dialog/dialog',
null,
[
'id' => 'my-dialog',
'content' => '<p>Hey there! This is a dialog</p>',
'button_text' => 'Open dialog box'
]
); ?>
</main>
<?php get_footer(); ?>