This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·117 lines (98 loc) · 4.1 KB
/
index.php
File metadata and controls
executable file
·117 lines (98 loc) · 4.1 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
<?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.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package North
* @since 1.0
*/
get_header();
if( is_front_page() ) {} else { ?>
<header class="page-titles">
<div class="container clearfix">
<!-- titles -->
<?php if( is_home() ) { ?>
<h2 class="entry-title"><?php echo apply_filters( 'the_title', get_the_title( get_option( 'page_for_posts' ) ) ); ?></h2>
<?php } else if( is_search() ) { ?>
<h2 class="entry-title"><?php printf( __( 'Search Results for: %s', 'north' ), '' . get_search_query() . '' ); ?></h2>
<?php } else if( is_tag() ) { ?>
<h2 class="entry-title"><?php _e('Tag','north'); ?> / <?php single_tag_title(); ?></h2>
<?php } else if( is_day() ) { ?>
<h2 class="entry-title"><?php _e('Archive','north'); ?> / <?php echo get_the_date(); ?></h2>
<?php } else if( is_month() ) { ?>
<h2 class="entry-title"><?php _e('Archive','north'); ?> / <?php echo get_the_date('F Y'); ?></h2>
<?php } else if( is_year() ) { ?>
<h2 class="entry-title"><?php _e('Archive','north'); ?> / <?php echo get_the_date('Y'); ?></h2>
<?php } else if( is_404() ) { ?>
<h2 class="entry-title"><?php _e('Page Not Found!','north'); ?></h2>
<?php } else if( is_category() ) { ?>
<h2 class="entry-title"><?php _e('Category','north'); ?> / <?php single_cat_title(); ?></h2>
<?php } else if( is_post_type_archive() ) { ?>
<h2 class="entry-title"><?php _e('Category','north'); ?> / <?php post_type_archive_title(); ?></h2>
<?php } else { ?>
<h2 class="entry-title"><?php single_post_title(); ?></h2>
<?php } ?>
<?php
if( is_singular() || is_home() ) {
$page_object = get_queried_object();
$page_id = get_queried_object_id();
if ( get_post_meta($page_id, 'subtitle', true) ) {
echo '<h3 class="entry-subtitle">' . get_post_meta($page_id, 'subtitle', true) . '</h3>';
}
}
?>
</div>
</header>
<?php } ?>
<section class="main">
<div class="container clearfix">
<div id="content">
<div class="posts">
<!-- Grab the posts -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article <?php post_class('post'); ?>>
<div class="box-wrap">
<div class="box">
<!-- post content -->
<div class="post-content">
<?php get_template_part( 'template-gallery' ); ?>
<?php if(is_single()) {} else { ?>
<div class="blog-entry-title">
<h2><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'north' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="blog-entry-date">
<span>
<em><?php _e( 'By', 'north' ); ?></em> <?php the_author_posts_link(); ?>
</span>
<span>
<em><?php _e( 'On', 'north' ); ?></em> <?php echo get_the_date(); ?>
</span>
<span>
<em><?php _e( 'With', 'north' ); ?></em> <a href="<?php the_permalink(); ?>/#comment-jump" title=""><?php comments_number(__('No Comments','north'),__('1 Comment','north'),__( '% Comments','north') );?></a>
</span>
</div>
</div>
<?php } ?>
<?php if( is_search() ) {
the_excerpt();
} else {
the_content( __( 'Read More', 'north' ) );
} ?>
</div><!-- post content -->
</div><!-- box -->
</div><!-- box wrap -->
</article><!-- post-->
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php north_page_nav(); ?>
</div><!-- content -->
<?php get_sidebar(); ?>
</div><!-- container -->
</section><!-- main -->
<!-- footer -->
<?php get_footer(); ?>