This repository was archived by the owner on Feb 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent.php
More file actions
106 lines (89 loc) · 2.9 KB
/
content.php
File metadata and controls
106 lines (89 loc) · 2.9 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* The default template for displaying content.
*
* Used for both single and index/archive/author/category/search/tag.
*
* @package Odin
* @since 2.2.0
*/
$post_class = '';
if ( !is_single() ) {
//$post_class = get_theme_mod( 'display_blog_sidebar', true ) ? 'post-side': 'post-full';
$post_class .= ' loop';
} else {
$post_class = get_theme_mod( 'display_posts_sidebar', true ) ? 'post-side': 'post-full';
$post_class .= ' single';
};
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<header class="entry-header">
<?php
if ( !is_single() ) :
?>
<a class="entry-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title">', '</h2>' );
endif;
?>
<?php
if ( !is_single() ) :
?>
</a>
<?php endif; ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php odin_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( is_single() ) : ?>
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<?php if ( is_single() || ( !is_single() && true == get_theme_mod( 'display_post_content', true ) ) ) : ?>
<div class="entry-content">
<?php
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'haste-store' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'haste-store' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
<?php endif; ?>
<?php
if ( is_single() ) :
?>
<footer class="entry-meta">
<p><?php the_tags( '<span class="tag-links">' . __( 'Tagged as:', 'haste-store' ) . ' ', '', '</span>' ); ?></p>
<?php if ( true == get_theme_mod( 'display_post_author', true ) ) : ?>
<div class="author-box vcard row">
<div class="col-md-2 author-avatar">
<?php echo get_avatar( get_the_author_meta( 'ID' ), 96, '' , '' , array( 'class' => 'img-circle') ); ?>
</div>
<div class="col-md-10 author-description">
<h2><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"><?php the_author(); ?></a></h2>
<?php echo get_the_author_meta( 'description' ); ?>
</div>
</div>
<?php endif; ?>
</footer>
<?php endif; ?>
</article><!-- #post-## -->