Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $locationsArray = array(
- 'post_type' => 'location',
- 'posts_per_page' => '-1',
- 'order_by' => 'title',
- 'order' => ASC
- );
- $locationsLoop = new WP_Query($locationsArray);
- $locationsArray2 = array(
- 'post_type' => 'location',
- 'posts_per_page' => '-1',
- 'order_by' => 'title',
- 'order' => ASC
- );
- $locationsLoop2 = new WP_Query($locationsArray2);
- <div class="st_tabs">
- <a href="#" class="st_prev">prev</a><a href="#" class="st_next">next</a>
- <div class="st_tabs_wrap">
- <ul class="st_tabs_ul">
- <?php while($locationsLoop -> have_posts()) : $locationsLoop -> the_post(); ?>
- <?php $count_posts = wp_count_posts('location'); ?>
- <?php for($i=1;$i<=$count_posts->publish;$i++){ ?>
- <li>
- <a href="#tab-<?php echo $i; ?>" rel="tab-<?php echo $i; ?>" class="st_tab st_tab_<?php echo $i; ?>">
- <?php the_title(); ?>
- </a>
- </li>
- <?php } ?>
- <?php wp_reset_postdata(); endwhile; ?>
- </ul>
- </div>
- </div>
- <div class="st_views">
- <?php while($locationsLoop2 -> have_posts()) : $locationsLoop2 -> the_post(); ?>
- <?php for($j=1;$j<=$count_posts->publish;$j++){ ?>
- <div class="tab-<?php echo $j; ?> st_view">
- <div class="st_view_inner">
- <h3 class="title"><?php the_title(); ?></h3>
- <div class="row">
- <div class="large-12">
- <div class="left">
- <?php the_content(); ?>
- </div>
- <div class="right">
- Google Map
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php } ?>
- <?php wp_reset_postdata(); endwhile; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement