This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/loop-templates/content.php

57 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2014-12-10 11:36:38 +00:00
<?php
/**
* Post rendering content according to caller of get_template_part
2016-11-21 18:12:07 +00:00
*
2014-12-10 11:36:38 +00:00
* @package understrap
*/
2016-11-21 18:12:07 +00:00
2019-06-20 08:57:12 +00:00
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
2014-12-10 11:36:38 +00:00
?>
2016-11-01 16:13:23 +00:00
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
2016-11-21 18:12:07 +00:00
<header class="entry-header">
2018-11-18 23:18:19 +00:00
<?php
the_title(
sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
'</a></h2>'
);
?>
2016-11-21 18:12:07 +00:00
<?php if ( 'post' == get_post_type() ) : ?>
2016-11-21 18:12:07 +00:00
<div class="entry-meta">
<?php understrap_posted_on(); ?>
</div><!-- .entry-meta -->
2016-11-21 18:12:07 +00:00
<?php endif; ?>
2016-11-21 18:12:07 +00:00
</header><!-- .entry-header -->
2016-11-21 18:12:07 +00:00
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
2016-11-21 18:12:07 +00:00
<div class="entry-content">
2018-11-18 23:18:19 +00:00
<?php the_excerpt(); ?>
2016-11-21 18:12:07 +00:00
<?php
2018-11-18 23:18:19 +00:00
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
'after' => '</div>',
)
);
2016-11-21 18:12:07 +00:00
?>
2016-11-21 18:12:07 +00:00
</div><!-- .entry-content -->
2016-11-21 18:12:07 +00:00
<footer class="entry-footer">
2016-11-21 18:12:07 +00:00
<?php understrap_entry_footer(); ?>
2016-11-21 18:12:07 +00:00
</footer><!-- .entry-footer -->
</article><!-- #post-## -->