Skip to content

Instantly share code, notes, and snippets.

@shehabkhan013
Created January 27, 2018 18: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 shehabkhan013/8f2e6906da1c9329a7d4c3d4b07e2569 to your computer and use it in GitHub Desktop.
Save shehabkhan013/8f2e6906da1c9329a7d4c3d4b07e2569 to your computer and use it in GitHub Desktop.
Wordpress Blog page Content Dynamic with while loop
<?php
if(have_posts()):
while(have_posts()): the_post();
?>
<div class="blog_left_single_item">
</div><!-- blog_left_single_item -->
<?php endwhile;?>
<?php
else:
get_template_part('template-parts/post/content', 'none');
endif;
wp_reset_postdata();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment