-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloop.php
61 lines (56 loc) · 3 KB
/
loop.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
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<article id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'wplitho' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'wplitho' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); echo WPLithoThemeOptions::post_style_attr( get_the_ID() ); ?>>
<?php if ( WPLithoThemeOptions::show_title( get_the_ID() ) ): ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wplitho' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php endif; ?>
<?php if ( is_search() ) : // Only display excerpts for search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php if ( has_post_thumbnail() /*$attachment_id = get_post_thumbnail_id()*/ ) :
// update_post_thumbnail_cache();
// list( $url, $width, $height ) = wp_get_attachment_image_src( $attachment_id ); ? >
// <div class="mobile-featured-image" style="background-image: url(<?php echo esc_attr( $url ); ? >);"></div>
?>
<div class="mobile-featured-image"><?php the_post_thumbnail( 'full' ); ?></div>
<?php endif; ?>
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'wplitho' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'wplitho' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<?php if ( WPLithoThemeOptions::option( 'show_meta' ) ): ?>
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'wplitho' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'wplitho' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'wplitho' ), __( '1 Comment', 'wplitho' ), __( '% Comments', 'wplitho' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'wplitho' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
<?php endif; ?>
</article><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php endwhile; // End the loop. Whew. ?>