bonsoir
je suis débutante en php
et je suis entrain de réaliser un site web sous wordpress
et j'ai un script php de recherche du theme
mais cet script fait la recherche sur les pages, courses, eventss, portofilios, blog..etc
mais moi je veux pas sa
je veux faire la recherche juste pour les pages
voila le script search.php que j'ai

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?php
 
	// Display Header
	get_header();
 
	// Get Theme Options
	global $data;
 
	// Get Post ID
	global $wp_query;$post_id = $wp_query->post->ID;
 
	// Get Header Image
	$header_image = page_header(get_post_meta($post_id, 'qns_page_header_image_url', true));
 
	// Get Content ID/Class
	$content_id_class = content_id_class(get_post_meta($post_id, 'qns_page_sidebar', true));
 
	// Reset Query
	wp_reset_query();
 
?>
 
<!-- BEGIN .page-header -->
<div class="page-header clearfix" <?php echo $header_image;	?>>
 
	<div class="page-header-inner clearfix">	
		<div class="page-title">	
			<h2><?php _e('Search Results','qns'); ?></h2>
			<div class="page-title-block"></div>
		</div>
		<?php dimox_breadcrumbs(); ?>
	</div>
 
<!-- END .page-header -->
</div>
 
<!-- BEGIN .content-wrapper -->
<div class="content-wrapper page-content-wrapper clearfix">
 
	<!-- BEGIN .main-content -->
	<div <?php echo $content_id_class; ?>>
 
		<!-- BEGIN .inner-content-wrapper -->
		<div class="inner-content-wrapper">
 
 
 
 
 
 
 
			<?php if (have_posts()) : ?>
 
				<div class="title1 clearfix">
					<h4><?php _e('Pages','qns') ?></h4>
					<div class="title-block"></div>
				</div>
 
 
 
				<?php 
					// Return Post Items
					$i = 0;
					while (have_posts()) : the_post(); 
 
						if( get_post_type() == 'post' ) { 
							$i++; ?>
 
							<li><strong><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></strong><br /> <?php print_excerpt(250); ?></li>
 
						<?php }
 
					endwhile;?>
 
					<?php if( $i == 0 ) { ?><li><?php _e( 'Pas de résultats.', 'qns' ); ?></li><?php } ?>
 
 
				<!--BEGIN .search-results-list -->
				<ol class="search-results-list">
 
 
 
 
 
				<?php // Include Pagination feature
				load_template( get_template_directory() . '/includes/pagination.php' );
				?>
 
			<?php else : ?>
 
				<div class="title1 clearfix">
					<h4><?php _e('Pages','qns') ?></h4>
					<div class="title-block"></div>
				</div>
 
 
 
 
 
 
 
				<!--BEGIN .search-results-list -->
				<ol class="search-results-list">
					<li><?php _e( 'Pas de résultats.', 'qns' ); ?></li>
				</ol>
 
			<?php endif; ?>
 
 
 
		<!-- END .inner-content-wrapper -->
		</div>
 
	<!-- END .main-content -->
	</div>
 
	<?php get_sidebar(); ?>
 
<!-- END .content-wrapper -->
</div>
 
<?php get_footer(); ?>

et voila le script formsearch.php


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
<form method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search">
	<input type="text" onblur="if(this.value=='')this.value='Rechercher...';" onfocus="if(this.value=='Rechercher...')this.value='';" value="Rechercher..." name="s" id="widget-search" />
</form>
est ce qu'il ya quelqu'un qui peux m'aidé

merci d'avance
a bientot