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(); ?>
2022-09-27 10:23:17 +02:00
<p class="meta"><span><?php the_time('d. F Y') ?> <?php _e( 'by', 'hangar' ); ?> <?php the_author() ?></span><br/>
2021-02-18 14:09:56 +01:00
<?php else : ?>
<?php the_content( __( 'Continue Reading &rarr;', 'hangar' ) ); ?>
<div class="clear"></div>
2022-09-27 10:23:17 +02:00
2021-02-18 14:09:56 +01:00
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'hangar' ), 'after' => '</div>' ) ); ?>
2022-09-27 10:23:17 +02:00
<p class="meta"><span><?php the_time('d. F Y') ?> <?php _e( 'by', 'hangar' ); ?> <?php the_author() ?></span><br/>
2021-02-18 14:09:56 +01:00
<?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; ?>
2022-09-27 10:23:17 +02:00
<?php //comments_popup_link( __( 'Leave a comment', 'hangar' ), __( '1 comment', 'hangar' ), __( '% comments', 'hangar' ) ); ?>
2021-02-18 14:09:56 +01:00
<?php edit_post_link( __( 'Edit &rarr;', 'hangar' ), '| ', '' ); ?></p>
</div>
<!--end Post-->
2022-09-27 10:23:17 +02:00
<?php //comments_template( '', true ); ?>
2021-02-18 14:09:56 +01:00
<?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; ?>