Created
January 16, 2017 16:50
-
-
Save tradesouthwest/bd0832babe17d12c84a6d9242ddd95c6 to your computer and use it in GitHub Desktop.
page template trial run for tevolution directory
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 | |
/** | |
* Template Name: Country Listing | |
* | |
* This is copy of the search template. | |
* modified by Codeable @tradesouthwest | |
* @uses custom_cat type for a country slug | |
*/ | |
get_header(); | |
do_action( 'before_content' ); | |
/* to show the breadcrumb */ | |
do_action( 'templ_before_container_breadcrumb' ); | |
?> | |
<section id="content" class="search_result_listing large-9 small-12 columns"> | |
<?php | |
do_action( 'open_content' ); | |
do_action( 'templ_inside_container_breadcrumb' ); | |
?> | |
<div class="hfeed"> | |
<?php | |
do_action('directory_after_search_title'); | |
/* Loads the sidebar-before-content. */ | |
apply_filters('tmpl_before-content',supreme_sidebar_before_content() ); | |
/* Loads the loop.php template. */ | |
//get_template_part( 'loop','search' ); | |
global $posts,$wpdb, $wp_query; | |
$post_query = $wp_query; | |
query_posts('post_type=listing&custom_cat=united+states'); | |
?> | |
<div id="tmpl-search-results" class="list"> | |
<?php | |
if ( have_posts() ) : | |
while ( have_posts() ) : the_post(); | |
do_action( 'before_entry' ); // supreme_before_entry | |
$format = get_post_format( $post->ID ); | |
?> | |
<div id="post-<?php echo $post->ID; ?>" <?php post_class(); ?>> | |
<?php | |
get_template_part( 'content', get_post_format()); | |
?> | |
</div> | |
<?php | |
do_action( 'after_entry' ); | |
endwhile; | |
wp_reset_query(); | |
else: | |
// Loads the loop-error.php template. | |
apply_filters('supreme-loop-error',get_template_part( 'loop-error' )); | |
endif; | |
?> | |
</div> | |
<?php | |
/* after-content-sidebar use remove filter to don't display it */ | |
apply_filters('tmpl_after-content',supreme_sidebar_after_content()); | |
?> | |
</div> | |
<!-- hfeed --> | |
<?php do_action( 'close_content' ); | |
?> | |
</section> | |
<!-- #content --> | |
<?php | |
do_action( 'after_content' ); | |
get_sidebar(); | |
get_footer(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment