forked from DuenaStudio/DuenaTheme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
44 lines (33 loc) · 1.37 KB
/
index.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
<?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 duena-revival
*/
get_header(); ?>
<div id="primary" class="col-md-8 <?php echo esc_attr( get_theme_mod('blog_sidebar_pos', 'right') ) ?>">
<div id="content" class="site-content" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post();
// The following determines what the post format is and shows the correct file accordingly
$format = get_post_format();
get_template_part( 'post-formats/'.$format );
if($format == '')
get_template_part( 'post-formats/standard' );
endwhile;
get_template_part('post-formats/post-nav');
else: ?>
<div class="no-results">
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'duena-revival' ); ?></p>
<?php get_search_form(); /* outputs the default Wordpress search form */ ?>
</div><!--no-results-->
<?php endif; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>