Created
May 27, 2014 20:44
-
-
Save anonymous/0459f28ad815dfc10f13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying all pages. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* @package WordPress | |
* @subpackage got_deros | |
* @since Got Deros 1.0 | |
*/ | |
get_header(); ?> | |
<div id="primary"> | |
<div id="content" role="main"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<div class="entry-content"> | |
<div class="cpt-search"> | |
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<input type="text" class="field" name="s" id="s" placeholder="SEARCH LISTINGS" /> | |
<input type="hidden" name="post_type" value="phone-listing" /> | |
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( ' ', 'gotderos' ); ?>" /> | |
</form> | |
</div> | |
<?php the_content(); ?> | |
<div class="category-list clearfix"> | |
<?php $terms = get_terms('city-guide-category')?> | |
<?php foreach($terms as $term): | |
wp_reset_query(); | |
$args = array('post_type' => 'city-guide', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'city-guide-category', | |
'field' => 'slug', | |
'terms' => $term->slug, | |
), | |
), | |
); | |
$loop = new WP_Query($args); | |
if($loop->have_posts()):?> | |
<a href="<?php esc_url(get_term_link($term))?>"><h3><?php echo ($term->name)?></h3></a> | |
<?php while($loop->have_posts()) : $loop->the_post()?> | |
<a href="<?php echo (get_permalink())?>"><h4><?php echo (get_the_title())?></h4></a> | |
<?php endwhile;?> | |
<?php endif;?> | |
<?php endforeach?> | |
</div><!--cat-list--> | |
<a href="/apo-friendly-merchants/" class="apo-friendly">+ <span class="red">APO FRIENDLY MERCHANTS</span></a> | |
</div><!-- .entry-content --> | |
</article><!-- #post-<?php the_ID(); ?>--> | |
<?php endwhile; // end of the loop. ?> | |
</div><!-- #content --> | |
</div><!-- #primary --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment