-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (38 loc) · 1.64 KB
/
index.php
File metadata and controls
41 lines (38 loc) · 1.64 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(); ?>
<!-- instead of the regular opening tags like <html><head>, we
invoke the get_header() command, and include the output of
header.php in this file.-->
<!-- this id lets us address the content area i nstyle.css -->
<div id="content">
<h1>Main Content Area -- Plus Stupid Notice</h1>
<!-- this is called "the loop"; it's a little complicated.
there are many tutorials but you can read more about it here:
https://codex.wordpress.org/The_Loop_in_Action
-->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2>
<!-- create a link whose href is the permanent link to this post,
and whose textual content is the post or page title-->
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h2>
<!-- use php's strange time parsing functions to write out the time -->
<h4>
Posted on <?php the_time('F jS, Y') ?>
</h4>
<!-- add the content -->
<p><?php the_content(__('(more...)')); ?></p>
<?php endwhile; else: ?>
<!-- see the "else" just above this line? If you've stumbled on a bad url,
this "no posts found" will tell you there's nothing to see here.-->
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div>
<!-- add the sidepar -->
<?php get_sidebar(); ?>
</div>
<!-- just showing you how to draw a line with an empty div -->
<div id="delimiter"></div>
<!-- get the footer now as well. THis wil lclose al lthe tags that opened in header.php -->
<?php get_footer(); ?>