Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Test
  4. */
  5. ?>
  6.  
  7. <div id="wrap-page">
  8. <div class="left">
  9. LIST BLOG POSTS HERE
  10. </div>
  11. <div class="right">
  12. CONTENT EDITABLED FROM ADMIN → PAGES → YOUR PAGE
  13. </div>
  14. </div>
  15.  
  16. #wrap-page {
  17. width: 100%;
  18. }
  19. .left {
  20. width: 50%;
  21. float: left;
  22. }
  23. .right {
  24. width: 50%;
  25. float: right;
  26. }
  27.  
  28. <?php query_posts(array('post_type' => 'post','orderby' => 'date'));
  29. if(have_posts()) : while(have_posts()) : the_post();
  30. // do something
  31. endwhile; else:
  32. // no posts found
  33. endif; wp_reset_query();
  34. ?>
  35.  
  36. <?php
  37. if ( have_posts() ) : while ( have_posts() ) : the_post();
  38. // do something
  39. endwhile; else:
  40. // no posts found
  41. endif;
  42. ?>
  43.  
  44. <?php
  45. /*
  46. Template Name: Test
  47. */
  48. ?>
  49.  
  50. <?php get_header(); ?>
  51.  
  52. <div id="wrap-page">
  53. <div class="left">
  54.  
  55. <?php query_posts(array('post_type' => 'post','orderby' => 'date'));
  56. if(have_posts()) : while(have_posts()) : the_post(); ?>
  57.  
  58. <?php the_post_thumbnail(); ?>
  59. <h3><?php the_title(); ?></h3>
  60. <?php the_content(); ?>
  61.  
  62. <?php endwhile; ?>
  63. <?php else : ?>
  64.  
  65. <p>sorry no results</p>
  66.  
  67. <?php endif; wp_reset_query(); ?>
  68.  
  69. </div>
  70. <div class="right">
  71.  
  72. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  73. <?php the_post_thumbnail(); ?>
  74.  
  75. <h3><?php the_title(); ?></h3>
  76. <?php the_content(); ?>
  77.  
  78. <?php endwhile; ?>
  79. <?php else : ?>
  80.  
  81. <p>sorry no results</p>
  82.  
  83. <?php endif; ?>
  84.  
  85. </div>
  86. </div>
  87.  
  88. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement