This repository was archived by the owner on Aug 22, 2019. It is now read-only.
forked from castlegateit/cgit-zero
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
54 lines (39 loc) · 1.36 KB
/
page.php
File metadata and controls
54 lines (39 loc) · 1.36 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
<?php
/**
* Page template
*
* This template displays standard pages. Use page-*.php files to add
* templates by slug; use the front-page.php template for static front pages;
* and use individual named templates with "Template Name" comments to allow
* templates to be selected in the WordPress admin section.
*/
?>
<?php get_header(); ?>
<div class="main">
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post(); // Start loop ?>
<h1><?php the_title(); ?></h1>
<?php
// Display featured image (use z_thumbnail_url() to get URL)
if(has_post_thumbnail()) {
the_post_thumbnail('thumbnail');
}
// Print content
the_content('Read more');
?>
<p class="article-meta"><?php
// Print date updated
echo 'Last updated ';
the_modified_time('j F Y');
// Print Twitter link
$twitter_url = get_permalink();
$twitter_text = urlencode(the_title('', '', false));
echo " | <a href=\"http://twitter.com/share?url=$twitter_url&text=$twitter_text\">Share on Twitter</a>";
// Print edit link
//edit_post_link('Edit', ' | ', '');
?></p>
<?php endwhile; ?>
<?php endif; // End if posts returned ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>