Advertisement
Guest User

Untitled

a guest
May 30th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. remove_action('genesis_loop','genesis_do_loop');
  2. add_action('genesis_loop','child_shopping_loop');
  3.  
  4.  
  5. add_action( 'wp_enqueue_scripts', 'bootstrap_enqueue_scripts' );
  6.  
  7.  
  8.  
  9. function child_shopping_loop() {
  10.  
  11.  
  12.  
  13. $recent = new WP_Query(array(
  14. 'post_type' => array( 'shopping'),
  15. 'orderby' => 'date',
  16. 'order'=> 'DESC',
  17. 'posts_per_page'=> -1,
  18.  
  19.  
  20. ));
  21.  
  22.  
  23. while ($recent->have_posts()) : $recent->the_post();
  24.  
  25. $return_string .='<div class="attr-entry entry">
  26.  
  27. <div class="one-fourth first">'.
  28. genesis_get_image( array(
  29. 'size' => 'full',
  30. 'attr' => array (
  31. 'class' => 'aligncenter'
  32. ) ) ).
  33. '</div>
  34.  
  35. <div class="three-fourths">
  36. <a class="toggle attr-toggle arrow-closed" data-toggle="collapse" data-target="#attr-desc-'.get_the_ID().'">More Info</a>
  37. <h2><a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_title().'</a></h2>'.
  38. get_the_excerpt().'
  39. </div>
  40.  
  41. <div id="attr-desc-'.get_the_ID().'" class="attr-desc collapse" style="height: auto;">'
  42. .wpautop(get_the_content()).'
  43.  
  44. </div>
  45. </div>';
  46.  
  47. endwhile;
  48.  
  49.  
  50. echo $return_string;
  51.  
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement