Advertisement
srikat

Untitled

May 26th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'genesis_loop', 'sk_do_loop' );
  4. /**
  5. * Outputs a custom loop
  6. *
  7. * @global mixed $paged current page number if paginated
  8. * @return void
  9. */
  10. function sk_do_loop() {
  11.  
  12. // Loop 1
  13. $args1 = (array(
  14. 'post_type' => 'portfolio',
  15. 'posts_per_page' => 3,
  16. 'no_found_rows' => true
  17. ));
  18.  
  19. echo '<h2 class="loop-title">Loop 1</h2>';
  20.  
  21. genesis_custom_loop( $args1 );
  22.  
  23. // Loop 2
  24. $args2 = (array(
  25. 'tag' => 'project',
  26. 'posts_per_page' => 6,
  27. 'no_found_rows' => true
  28. ));
  29.  
  30. echo '<h2 class="loop-title">Loop 2</h2>';
  31.  
  32. genesis_custom_loop( $args2 );
  33. }
  34.  
  35. genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement