Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. $locationsArray = array(
  2. 'post_type' => 'location',
  3. 'posts_per_page' => '-1',
  4. 'order_by' => 'title',
  5. 'order' => ASC
  6. );
  7. $locationsLoop = new WP_Query($locationsArray);
  8.  
  9. $locationsArray2 = array(
  10. 'post_type' => 'location',
  11. 'posts_per_page' => '-1',
  12. 'order_by' => 'title',
  13. 'order' => ASC
  14. );
  15. $locationsLoop2 = new WP_Query($locationsArray2);
  16.  
  17. <div class="st_tabs">
  18. <a href="#" class="st_prev">prev</a><a href="#" class="st_next">next</a>
  19. <div class="st_tabs_wrap">
  20. <ul class="st_tabs_ul">
  21. <?php while($locationsLoop -> have_posts()) : $locationsLoop -> the_post(); ?>
  22. <?php $count_posts = wp_count_posts('location'); ?>
  23. <?php for($i=1;$i<=$count_posts->publish;$i++){ ?>
  24.  
  25. <li>
  26. <a href="#tab-<?php echo $i; ?>" rel="tab-<?php echo $i; ?>" class="st_tab st_tab_<?php echo $i; ?>">
  27. <?php the_title(); ?>
  28. </a>
  29. </li>
  30.  
  31. <?php } ?>
  32.  
  33. <?php wp_reset_postdata(); endwhile; ?>
  34. </ul>
  35. </div>
  36. </div>
  37.  
  38. <div class="st_views">
  39. <?php while($locationsLoop2 -> have_posts()) : $locationsLoop2 -> the_post(); ?>
  40. <?php for($j=1;$j<=$count_posts->publish;$j++){ ?>
  41.  
  42. <div class="tab-<?php echo $j; ?> st_view">
  43. <div class="st_view_inner">
  44. <h3 class="title"><?php the_title(); ?></h3>
  45. <div class="row">
  46. <div class="large-12">
  47. <div class="left">
  48. <?php the_content(); ?>
  49. </div>
  50. <div class="right">
  51. Google Map
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57.  
  58. <?php } ?>
  59.  
  60. <?php wp_reset_postdata(); endwhile; ?>
  61. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement