This repository was archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·125 lines (101 loc) · 3.62 KB
/
index.php
File metadata and controls
executable file
·125 lines (101 loc) · 3.62 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme and one of the
* two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* For example, it puts together the home page when no home.php file exists.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package Wonder
* @link https://themebeans.com/themes/wonder
*/
get_header();
wonder_blog_sidebar_loader(); ?>
<div id="primary-container" class="fadein">
<div class="row">
<div class="<?php echo esc_attr( $bean_blog_content_class ); ?> mobile-four">
<?php if ( is_archive() ) { // CHECK FOR ARCHIVES ?>
<h1 class="entry-title archive-title">
<?php
// OUTPUT AUTHOR'S NAME
if ( is_author() ) :
// PULL AUTHOR INFO
global $authordata, $curauth;
if ( isset( $_GET['author_name'] ) ) :
$curauth = get_userdatabylogin( $author_name );
else :
$curauth = get_userdata( intval( $author ) );
endif;
// VARIABLES
$description = $curauth->user_description;
$name = $curauth->nickname;
// OUTPUT NAME
echo $name;
_e( ''s Posts.', 'wonder' );
?>
</h1>
<p class="archive-title">
<?php
// OUTPUT AUTHOR'S BIO IF ENTERED
if ( $description != '' ) {
echo esc_html( $description ); } // OUTPUT THE FOLLOWING IF NO BIO ENTERED
else {
_e( 'This author has not added a biography yet. Meanwhile he/she has contributed ', 'wonder' );
the_author_posts();
_e( ' posts. Check them out below:', 'wonder' ); }
?>
</p>
<?php
elseif ( is_tag() ) :
printf( __( 'Tagged: %s', 'wonder' ), single_tag_title( '', false ) . '' );
elseif ( is_category() ) :
printf( __( 'Category: %s', 'wonder' ), '' . single_cat_title( '', false ) . '' );
elseif ( is_day() ) :
printf( __( 'Archives: %s', 'wonder' ), '' . get_the_date() . '' );
elseif ( is_month() ) :
printf( __( 'Archives: %s', 'wonder' ), '' . get_the_date( _x( 'F Y', 'monthly archives date format', 'wonder' ) ) . '' );
elseif ( is_year() ) :
printf( __( 'Archives: %s', 'wonder' ), '' . get_the_date( _x( 'Y', 'yearly archives date format', 'wonder' ) ) . '' );
else :
printf( __( 'Archives', 'wonder' ) );
endif;
?>
</h1>
<?php } // END is_archive() ?>
<?php
// THE LOOP
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
$format = get_post_format();
if ( false === $format ) {
$format = 'standard'; }
if ( $format == 'aside' || $format == 'gallery' || $format == 'image' || $format == 'link' || $format == 'quote' ) {
}
get_template_part( 'inc/post-formats/content', $format );
endwhile;
endif;
?>
<div class="pagination index">
<span class="page-previous">
<?php next_posts_link( '' ); ?>
</span><!-- END .nav-previous -->
<span class="page-next">
<?php previous_posts_link( '' ); ?>
</span><!-- END .nav-next -->
</div><!-- END .pagination index -->
</div>
<?php if ( $bean_blog_sidebar_location === 'left' || $bean_blog_sidebar_location === 'right' ) { ?>
<div class="<?php echo esc_attr( $bean_blog_sidebar_class ); ?> hide-for-small">
<aside class="sidebar " role="complementary">
<?php dynamic_sidebar( 'internal-sidebar' ); ?>
</aside><!-- END .sidebar -->
</div><!-- END $bean_blog_sidebar_class -->
<?php } // END SIDEBAR LEFT OR RIGHT ?>
</div><!-- END .row -->
</div><!-- END #primary-container -->
<?php
get_footer();