Need WP Coding help!
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(ima ges/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;mar gin-left:0;}
#sform{width:300px;height:20px; font-size:12px; padding:2px; }
#s{width:180px;height:15px;border:#333333;backgrou nd: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;}
Then the search box 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.val ue='';" onblur="if(this.value=='')this.value=this.defaultV alue;" type="text">
<input src="<?php bloginfo('template_directory'); ?>/images/space.gif" value=" " type="image">
</form>
</div>
2. The main page template doesn't work. Here is the 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!
Masud
Email me at: masud@softsubstation.com
[to start PSD-to-XHTML/CSS $70; PSD-to-Joomla/WP $150 only]