-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloop.php
More file actions
55 lines (52 loc) · 2.55 KB
/
loop.php
File metadata and controls
55 lines (52 loc) · 2.55 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
<article class="blog-post <?php echo is_sticky() ? 'jumbotron' : ''; ?>">
<h1 class="blog-post-title">
<?php if( is_single() || is_page() ) { ?>
<?php the_title(); ?>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( '%s', TRANSLATION_KEY ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a>
<?php } // end if ?>
</h1>
<?php if ( ! is_page() ) { ?>
<p class="blog-post-meta">
<?php if ( ! get_the_title() ) { ?>
<a href="<?php the_permalink()?>"><?php the_time( get_option( 'date_format' ) ); ?></a>
<?php } else { ?>
<?php the_time( get_option( 'date_format' ) ); ?>
<?php } // end if ?>
by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php echo get_the_author_meta( 'display_name' ); ?>"><?php echo the_author_meta( 'display_name' ); ?></a>
</p>
<?php } // end if ?>
<div class="blog-content">
<?php if( ( is_category() || is_archive() || is_home() ) && has_excerpt() ) { ?>
<?php the_excerpt( ); ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Continue Reading...', TRANSLATION_KEY ); ?></a>
<?php } else { ?>
<?php the_content( __( 'Continue Reading...', TRANSLATION_KEY ) ); ?>
<?php } // end if/else ?>
<?php
wp_link_pages(
array(
'before' => '<ul class="pager"><li>',
'after' => '</li></ul>',
'separator' => '</li><li>',
'next_or_number' => 'next',
'previouspagelink' => __( '« Prev Page' ),
'nextpagelink' => __( 'Next Page »' ),
)
);
?>
</div><!-- /.blog-content -->
<?php if ( is_single() ) { ?>
<div class="blog-post-footer">
<?php $category_list = get_the_category_list( __( ' ', TRANSLATION_KEY ) ); ?>
<?php if( $category_list ) { ?>
<?php printf( __( 'In %1$s ', TRANSLATION_KEY ), $category_list ); ?>
<?php echo '' . $category_list; ?>
<?php } // end if ?>
<?php $tag_list = get_the_tag_list( __( ' ', TRANSLATION_KEY ) ); ?>
<?php if( $tag_list ) { ?>
<?php echo $tag_list; ?>
<?php } // end if ?>
</div>
<?php } ?>
</article><!-- /.blog-post -->