Geo
This commit is contained in:
78
search.php
Executable file
78
search.php
Executable file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
get_header();
|
||||
?>
|
||||
<div class="content">
|
||||
<div class="container">
|
||||
<div class="post_content">
|
||||
<div class="archive_title">
|
||||
<h2><?php echo __('Search Results','CreatorThemeRes-child').': '.get_search_query(); ?></h2>
|
||||
</div><!--//archive_title-->
|
||||
|
||||
<?php
|
||||
$args = array_merge( $wp_query->query, array( 'posts_per_page' => 13, 'post_type' => 'post' ) );
|
||||
$query = new WP_Query($args);
|
||||
if ( $query->have_posts() ) : ?>
|
||||
<div class="blog">
|
||||
<div class="archive-posts">
|
||||
<?php
|
||||
while ($query->have_posts() ) : $query->the_post();
|
||||
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(600,600) );
|
||||
?>
|
||||
<div class="blog-post-box">
|
||||
<div class="blog-post-feature">
|
||||
<?php
|
||||
$type = get_post_meta($post->ID,'page_featured_type',true);
|
||||
switch ($type) {
|
||||
case 'youtube':
|
||||
echo '<iframe width="560" height="315" src="http://www.youtube.com/embed/'.get_post_meta( get_the_ID(), 'page_video_id', true ).'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
|
||||
break;
|
||||
case 'vimeo':
|
||||
echo '<iframe src="http://player.vimeo.com/video/'.get_post_meta( get_the_ID(), 'page_video_id', true ).'?title=0&byline=0&portrait=0&color=03b3fc" width="500" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
break;
|
||||
default:
|
||||
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(600,600) );
|
||||
echo '<div class="blog-post-image">
|
||||
<a href="'.get_permalink().'" style="background-image: url('.$thumbnail[0].')"></a>';
|
||||
echo '<h3><a href="'.get_the_permalink().'">'.get_the_title().'</a></h3>';
|
||||
echo '</div>';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</div><!-- blog-posts -->
|
||||
<div class="blog-pagination">
|
||||
<?php
|
||||
$big = 999999999; // need an unlikely integer
|
||||
echo paginate_links( array(
|
||||
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
|
||||
'format' => '?paged=%#%',
|
||||
'current' => max( 1, get_query_var('paged') ),
|
||||
'total' => $query->max_num_pages,
|
||||
'prev_text' => '←',
|
||||
'next_text' => '→'
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
</div><!-- blog -->
|
||||
<?php
|
||||
else :
|
||||
?>
|
||||
<h2><?php echo __('No results found','CreatorThemeRes-child'); ?></h2>
|
||||
<p><?php echo __('Try to search again.','CreatorThemeRes-child'); ?></p>
|
||||
<?php //get_search_form(); ?>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
get_footer();
|
||||
?>
|
||||
Reference in New Issue
Block a user