This repository has been archived by the owner on Mar 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathsection.php
69 lines (55 loc) · 2.4 KB
/
section.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
65
66
67
68
69
<?php
/**
* The template for displaying content in 'Traditional' post section.
* @since 1.6
*/
?>
<article id="post-<?php the_ID() ?>" <?php post_class() ?>>
<header class="entry-header clearfix">
<?php
if ( ar2_get_theme_option( 'post_display[post_cats]' ) ) {
$post_cats = array();
$cats = get_the_category();
foreach ( $cats as $c )
$post_cats[] = '<a href="' . get_category_link( $c->cat_ID ) . '">' . $c->cat_name . '</a>';
echo '<div class="entry-cats">' . implode( ', ', $post_cats ) . '</div>';
}
?>
<h1 class="entry-title">
<?php if ( false !== get_post_format() ) : ?>
<span class="entry-format"><?php echo get_post_format_string( get_post_format() ) ?></span>
<?php endif ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title() ?></a>
</h1>
<?php if ( ar2_get_theme_option( 'post_display[post_author]' ) ) : ?>
<div class="entry-author">
<?php printf( __( 'Posted by %1$s %2$s', 'ar2' ),
'<address class="author vcard"><a rel="author" class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '">' . get_the_author() . '</a></address>',
'<abbr class="published">' . ar2_posted_on( false ) . '</abbr>'
); ?>
<?php edit_post_link( __( 'Edit', 'ar2' ) ) ?>
</div>
<?php else : ?>
<div class="entry-author">
<?php printf( __( 'Posted %s', 'ar2' ), '<abbr class="published">' . ar2_posted_on( false ) . '</abbr>' ); ?>
<?php edit_post_link( __( 'Edit', 'ar2' ) ) ?>
</div>
<?php endif ?>
<?php if ( ar2_get_theme_option( 'post_display[excerpt]' ) && has_excerpt() ) : ?>
<div class="entry-excerpt"><?php the_excerpt() ?></div>
<?php endif ?>
<?php if ( ar2_get_theme_option( 'post_display[single_thumbs]' ) && has_post_thumbnail( $post->ID ) ) : ?>
<div class="entry-photo"><?php echo ar2_get_thumbnail( 'single-thumb' ) ?></div>
<?php endif ?>
</header><!-- .entry-header -->
<div class="entry-content clearfix">
<?php the_content( __( 'Read the rest of this entry', 'ar2' ) ); ?>
</div>
<footer class="entry-footer clearfix">
<?php if ( ar2_get_theme_option( 'post_display[post_tags]' ) && is_array( get_the_tags() ) ) : ?>
<div class="entry-tags tags">
<?php the_tags( '<strong>' . __( 'Tags: ', 'ar2' ) . '</strong>', ' ' ) ?>
</div>
<?php endif ?>
</footer><!-- .entry-footer -->
</article>