-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
123 lines (106 loc) · 3.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php get_header(); ?>
<div id="main-content">
<div class="header-full">
<div class="container">
<div class="breadcrumb">
<p><span><a href="<?php echo home_URL() ?>">home/ </a></span>
busca
<h1><?php echo $_GET['s']; ?></h1>
</div>
</div>
</div>
<div class="entry-content">
<div class="et_pb_section">
<div class="et_pb_row">
<div class="et_pb_column et_pb_column_4_4">
<div class="et_pb_blog_grid_wrapper">
<div class="et_pb_blog_grid clearfix et_pb_bg_layout_light">
<?php
$fullwidth = 'off';
$meta_date = 'M j, Y';
$show_thumbnail = 'on';
$show_content = 'off';
$show_author = 'on';
$show_categories = 'on';
$show_pagination = 'on';
$background_layout = 'light';
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post post-module' ); ?>>
<?php
$thumb = '';
$width = 'on' === $fullwidth ? 1080 : 400;
$width = (int) apply_filters( 'et_pb_blog_image_width', $width );
$height = 'on' === $fullwidth ? 675 : 250;
$height = (int) apply_filters( 'et_pb_blog_image_height', $height );
$classtext = 'on' === $fullwidth ? 'et_pb_post_main_image' : '';
$titletext = get_the_title();
$thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
$thumb = $thumbnail["thumb"];
if ( '' !== $thumb && 'on' === $show_thumbnail ) :
if ( 'on' !== $fullwidth ) echo '<div class="et_pb_image_container">'; ?>
<a href="<?php the_permalink(); ?>">
<?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?>
</a>
<?php
if ( 'on' !== $fullwidth ) echo '</div> <!-- .et_pb_image_container -->';
endif;
?>
<h2>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<span class="cmm">
<a href="<?php the_permalink(); ?>#comments"><span class="cmm-cnt"><?php echo get_comments_number(); ?></span></a>
</span>
</h2>
<?php
if ( 'on' === $show_author || 'on' === $show_date || 'on' === $show_tags ) {
printf( '<p class="post-meta">%1$s %2$s %3$s</p>',
(
'on' === $show_author
? sprintf( __( 'por %s |', 'Divi' ), et_get_the_author_posts_link() )
: ''
),
(
'on' === $show_date
? sprintf( __( '%s |', 'Divi' ), get_the_date( $meta_date ) )
: ''
),
(
'on' === $show_categories
? get_the_category_list(', ')
: ''
)
);
}
if ( 'on' === $show_content ) {
global $more;
$more = null;
the_content( __( 'read more...', 'Divi' ) );
} else {
the_excerpt();
}
?>
</article> <!-- .et_pb_post -->
<?php }
if ( 'on' === $show_pagination && ! is_search() ) {
echo '</div> <!-- .et_pb_posts -->';
$container_is_closed = true;
if ( function_exists( 'wp_pagenavi' ) )
wp_pagenavi();
else
get_template_part( 'includes/navigation', 'index' );
}
wp_reset_query();
} else {
get_template_part( 'includes/no-results', 'index' );
}
?>
</div><!-- clearix -->
</div><!-- et_pb_blog_grid_wrapper -->
</div><!-- et_pb_column et_pb_column_4_4 -->
</div><!--et_pb_row-->
</div><!--et_pb_section-->
</div><!-- entry-content -->
</div> <!-- #main-content -->
<?php get_footer(); ?>