Created
August 13, 2016 11:47
-
-
Save iMojtaba/89d423796cf4d0a8dcc55036e22739d6 to your computer and use it in GitHub Desktop.
This file contains 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: Filter Result */ | |
get_header(); ?> | |
<main role="main" class="main"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<div class="search_popup_container open filter"> | |
<div class="search_box"> | |
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> | |
<input type="text" placeholder="جستجو" name="s" value="<?php the_search_query(); ?>"> | |
<button><i class="icon-search"></i></button> | |
</form> | |
<ul class="search_result"> | |
<?php if(have_posts()) : while(have_posts()) : the_post(); ?> | |
<li class="search_item"> | |
<article> | |
<h1><a href="<?php the_permalink() ?>" target="_blank"><?php the_title(); ?></a></h1> | |
<a href="<?php the_permalink() ?>" class="permalink" target="_blank"><?php echo ShortenText(get_the_permalink(), 50); ?></a> | |
<div class="excerpt"><?php echo ShortenText(get_the_excerpt(), 400); ?></div> | |
</article> | |
</li> | |
<?php endwhile; wp_pagenavi(); else: ?> | |
<h6>متاسفانه جستجوی شما نتیجهای در بر نداشت.</h6> | |
<?php endif; ?> | |
</ul> | |
</div><!-- search_box --> | |
</div><!-- search_popup_container --> | |
</div><!--col-xs-12--> | |
</div><!-- row --> | |
</div><!-- container --> | |
</main> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment