Skip to content

Instantly share code, notes, and snippets.

@alekskravchenko
Last active August 24, 2017 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alekskravchenko/5394e8d454dc76af2a310dc3b1dd12ec to your computer and use it in GitHub Desktop.
Save alekskravchenko/5394e8d454dc76af2a310dc3b1dd12ec to your computer and use it in GitHub Desktop.
custom blog page
<?php get_header(); ?>
<div class="main-container">
<div id="content">
<div id="main">
<?php query_posts('post_type=post&post_status=publish&posts_per_page=5&paged='. get_query_var('paged')); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part('content', 'home'); ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment