forked from Piratenpartei/Pirate-Rogue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
65 lines (61 loc) · 3.42 KB
/
content.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
62
63
64
65
<?php
/**
* The default template for displaying content
*
* @package Pirate Rogue
* @since Pirate Rogue 1.0
* @version 1.0
*/
?>
<?php
$thumbfallbackid = absint(get_theme_mod( 'pirate_rogue_fallback_blogroll_thumbnail' ));
$imagesrc = wp_get_attachment_image_src( $thumbfallbackid, 'pirate-rogue-standard-blog' );
if ($imagesrc) {
$imagesrc = $imagesrc[0];
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('cf'); ?>>
<?php if ( '' !== get_the_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail fadein" aria-hidden="true" role="presentation" tabindex="-1">
<a href="<?php the_permalink(); ?>"><span class="thumb-wrap"><?php the_post_thumbnail('pirate-rogue-standard-blog'); ?></span></a>
</div><!-- end .entry-thumbnail -->
<?php elseif ( ! post_password_required() && $imagesrc != '') : ?>
<div class="entry-thumbnail fadein fallback" aria-hidden="true" role="presentation" tabindex="-1">
<a href="<?php the_permalink(); ?>"><span class="thumb-wrap"><img src="<?php echo $imagesrc; ?>" alt="<?php echo get_the_title();?>"></span></a>
</div><!-- end .entry-thumbnail -->
<?php endif; ?>
<div class="meta-main-wrap">
<div class="entry-meta">
<?php pirate_rogue_posted_by(); ?>
<span class="entry-date" aria-hidden="true">
<a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a>
</span><!-- end .entry-date -->
<?php if ( comments_open() ) : ?>
<span class="entry-comments">
<?php comments_popup_link(
'<span class="leave-reply"><span class="comment-name">' . esc_html__( 'Comments', 'pirate-rogue') . '</span>' . esc_html__( '0', 'pirate-rogue') . '</span>',
'<span class="comment-name">' . esc_html__( 'Comments', 'pirate-rogue') . '</span>' . esc_html__( '1', 'pirate-rogue'),
'<span class="comment-name">' . esc_html__( 'Comments', 'pirate-rogue') . '</span>' . esc_html__( '%', 'pirate-rogue') )
; ?>
</span><!-- end .entry-comments -->
<?php endif; // comments_open() ?>
<?php edit_post_link( esc_html__( 'Edit Post', 'pirate-rogue'), '<span class="entry-edit">', '</span>' ); ?>
</div><!-- end .entry-meta -->
<div class="entry-main">
<header class="entry-header">
<?php if ( has_category() ) : ?>
<div class="entry-cats">
<?php the_category(' '); ?>
</div><!-- end .entry-cats -->
<?php endif; // has_category()
echo '<h2 class="entry-title"><a href="'.esc_url( get_permalink() ).'" rel="bookmark">';
echo get_the_title();
echo '</a><span class="screen-reader-text"> ('. get_the_date().')</span></h2>';
?>
</header><!-- end .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</div>
</div><!-- .meta-main-wrap -->
</article><!-- end post -<?php the_ID(); ?> -->