forked from owen0o0/WebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
54 lines (47 loc) · 2.11 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
get_header();
?>
<a href="<?php bloginfo('url') ?>" style="position:absolute;margin:30px 0 0 30px;z-index:1000;"><img src="<?php echo io_get_option('logo_normal') ?>" height="40" alt="<?php bloginfo('name') ?>"></a>
<div class="main-content">
<div id="search" class="s-search">
<form name="formsearch" method="get" action="<?php bloginfo('url'); ?>?s=" id="super-search-fm">
<input type="text" id="search-text" name="s" class="search-keyword" placeholder="输入关键字搜索" style="outline:0"/>
<button type="submit" οnmοuseοut="this.className='select_class'" οnmοuseοver="this.className='select_over'" ><i class="fa fa-search "></i></button>
</form>
</div>
<div class="row">
<div class="col-12 col-lg-8 mx-auto">
<h4 class="text-gray"><i class="fa fa-search" style="margin-right: 27px;"></i>“<?php echo $s; ?>” <?php _e('的搜索结果','i_swallow'); ?></h4>
<div class="row">
<?php if ( !have_posts() ) : ?>
<div class="col-lg-12">
<div class="nothing">没有内容</div>
</div>
<?php endif; ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();
$link_url = get_post_meta($post->ID, '_sites_link', true);
$default_ico = get_template_directory_uri() .'/images/favicon.png';
if(current_user_can('level_10') || get_post_meta($post->ID, '_visible', true)!="true"):
?>
<div class="xe-card col-sm-4 col-md-3 <?php echo get_post_meta($post->ID, '_wechat_qr', true)? 'wechat':''?>">
<?php include( 'templates/site-card.php' ); ?>
</div>
<?php endif; endwhile; endif;?>
</div>
<br />
<div class="posts-nav">
<?php echo paginate_links(array(
'prev_next' => 0,
'before_page_number' => '',
'mid_size' => 2,
));?>
</div>
<div style="text-align:center;margin-top:50px;margin-bottom:30px;">
<a href="<?php bloginfo('url') ?>" class="but-home ">返回主页</a>
</div>
</div>
</div>
<?php
get_footer();