hangar-wp-theme/loop.php

49 lines
2.1 KiB
PHP
Raw Permalink Normal View History

<aside class="hero">
<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
</aside>
2021-02-18 14:09:56 +01:00
<?php /* Start the Loop. */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php the_excerpt(); ?>
<p class="meta"><span><?php the_time('d. F Y') ?> <?php _e( 'by', 'hangar' ); ?> <?php the_author() ?></span><br/>
<?php else : ?>
<?php the_content( __( 'Continue Reading &rarr;', 'hangar' ) ); ?>
<div class="clear"></div>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'hangar' ), 'after' => '</div>' ) ); ?>
<p class="meta"><span><?php the_time('d. F Y') ?> <?php _e( 'by', 'hangar' ); ?> <?php the_author() ?></span><br/>
<?php endif; ?>
<?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'hangar' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
|
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<?php printf( __( 'Tags: %2$s', 'hangar' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
|
<?php endif; ?>
<?php comments_popup_link( __( 'Leave a comment', 'hangar' ), __( '1 comment', 'hangar' ), __( '% comments', 'hangar' ) ); ?>
<?php edit_post_link( __( 'Edit &rarr;', 'hangar' ), '| ', '' ); ?></p>
</div>
<!--end Post-->
<?php comments_template( '', true ); ?>
<?php endwhile; // End the loop. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<p class="previous"><?php next_posts_link( __( '&larr; Older posts', 'hangar' ) ); ?></p>
<p class="next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'hangar' ) ); ?></p>
<?php endif; ?>