Hi DP, I apologize if this is in the wrong place. If it is, please let me know and I'll move my post. I have a customized WP theme but there are two issues that I really need help with. 1. My search box doesn't work. Style.CSS code: searchr{width:126px;height:28px;background:url(images/searchbg.png);right:0;} .searchr input[type="text"]{border:0;margin:6px 0;margin-left:3px;padding:1px;width:95px;background: none !important; height:18px;float:left;color:#666666;font-family:Arial;font-size:13px; font-weight:bold;} .searchr input[type="image"]{width:20px;height:27px;float:right;margin:0px;margin-left:0;} #sform{width:300px;height:20px; font-size:12px; padding:2px; } #s{width:180px;height:15px;border:#333333;background:url(images/search.png) no-repeat;padding:5px;} #s input{height:25px;width:50px;} #searchsubmit{font-weight:bold;color:#CCCCCC;width:65px; padding:4px;height:19px;background:#364040; } .searchform input{vertical-align:middle;} The code on the page templates is: <div class="searchr"> <form id="searchform" action="<?php bloginfo('url'); ?>/"> <input name="s" value="Search Site..." onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" type="text"> <input src="<?php bloginfo('template_directory'); ?>/images/space.gif" value=" " type="image"> </form> </div> 2. Nothing I type shows up on the index page. Here is the template code: <?php query_posts('posts_per_page=4&cat=4'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="grey"><!--grey start--> <div class="grey_heading"><?php echo the_title() ?></div> <div class="grey_text"> <?php $content=get_the_content(); echo substr(strip_tags($content),0,260);?> <a href="#">Read more...</a> </div> </div><!--grey end--> <?php endwhile; endif; ?> <div style="clear:both;"></div> <?php query_posts('posts_per_page=1&cat=7'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="heading"><?php echo the_title() ?></div> <div class="text"> <?php $content=get_the_content(); echo $content;?> </div> <?php endwhile; endif; ?> <br /> </div><!--content end--> Any and all help is greatly appreciated. Thank you in advance!
<form id="searchform" action="<?php bloginfo('url'); ?>/"> That forward slash may be the problem. As for the second question, all I can think of is that the posts are not in category 4 or 7.
Alanaj Your problem needs a more detailed discussion, feel free to contact our website company, our experts will definitely help you
Forget what I said about the forward slash, your search box works fine in TwentyTen. The bloginfo function doesn't put a forward slash on the end of directories. I found out that your code has a problem because it overrides the search query. You need to add the extra parameters to the end of the query string: <?php query_posts($query_string.'&posts_per_page=4&cat=4'); ?> ... <?php query_posts($query_string.'&posts_per_page=1&cat=7'); ?> ... Code (markup):
Cash, Thanks for taking the time to help me out with this. It turns out the problem is larger than just adjusting the coding. Cheers