Advertisement
srikat

Untitled

Mar 20th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. function sk_custom_loop( $args = array() ) {
  2.  
  3. global $wp_query, $more;
  4.  
  5. $defaults = array(); //* For forward compatibility
  6. $args = apply_filters( 'genesis_custom_loop_args', wp_parse_args( $args, $defaults ), $args, $defaults );
  7.  
  8. $wp_query = new WP_Query( $args );
  9.  
  10. // added this based on http://www.relevanssi.com/knowledge-base/relevanssi_do_query/
  11. relevanssi_do_query( $wp_query );
  12.  
  13. //* Only set $more to 0 if we're on an archive
  14. $more = is_singular() ? $more : 0;
  15.  
  16. genesis_standard_loop();
  17.  
  18. //* Restore original query
  19. wp_reset_query();
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement