Example #1
0
<?php 
$args = (array) get_option('dp_home_featured');
if (!empty($args['posts_per_page'])) {
    if (!empty($args['layout']) && $args['layout'] == 'full-width') {
        get_template_part('home-featured-full-width');
    } else {
        get_template_part('home-featured');
    }
}
?>

<div id="main"><div class="wrap cf">
	<div id="content">
	<?php 
// Output home sections based on user's settings
$sections = get_option('dp_home_sections');
if (!empty($sections)) {
    foreach ($sections as $section_args) {
        dp_section_box($section_args);
    }
}
?>
	</div><!-- end #content -->
	
	<?php 
get_sidebar();
?>
</div></div><!-- end #main -->

<?php 
get_footer();
			
			<div class="page-content rich-content">
				
				<?php 
    // Recently Updated
    $args = array('view' => 'list-small', 'title' => __('Recently Added', 'dp'), 'post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 12, 'orderby' => 'date');
    dp_section_box($args);
    // Most Liked
    $args = array('view' => 'grid-medium', 'title' => __('Most Liked', 'dp'), 'post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 6, 'orderby' => 'likes');
    dp_section_box($args);
    // Most Viewed
    $args = array('view' => 'grid-mini', 'title' => __('Most Viewed', 'dp'), 'post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 12, 'orderby' => 'views');
    dp_section_box($args);
    // Most Commented
    $args = array('view' => 'grid-small', 'title' => __('Most Commented', 'dp'), 'post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => 9, 'orderby' => 'comments');
    dp_section_box($args);
    ?>

				<?php 
    wp_link_pages(array('before' => '<p class="entry-nav pag-nav"><strong>' . __('Pages:', 'dp') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
    ?>
			</div>
			
		</div><!--end .hentry-->
		<?php 
}
?>
		
	</div><!--end #content-->
	
	<div id="sidebar">