سلام
در اين مورد از ادمين محترم سوال كردم و ايشون در نظرات پاسخ دادند و منم انجام دادم ولي نشد نميدونم شايد من نفهميدم ديدم بهتر بحث اينجا دنبال بشه
هدف هم آوردن باكس سرج از هدر اين قالب به سايدبار هست يا همون ستون سمت راست قالب هست!
من كد سرچ رو از index به sidebar آوردم ولي نشد يعني بهم ريخت تو css هم اون قسمتي كه مربوط به سرچ بود رو دستكاري كردم كه بدتر شد!
اينم كدهاي دست نخورده قالب
كد index :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>فروشگاه اینترنتی, خرید اینترنتی</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="fa" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" />
<link rel="shortcut icon" type="image/ico" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" />
</head>
<body>
<div dir="rtl">
<div id="all">
<div id="all-up"></div>
<div id="all-body">
<div id="header">
<div id="search">
<form action="../" method="get">
<input type="text" name="s" id="s" value="" size="20" class="search-input" />
<input type="submit" name="btnSubmit" id="btnSubmit" value="" class="search-button" />
</form>
</div>
</div>
<?php include (TEMPLATEPATH . '/sidebar.php'); ?>
<div id="leftcol">
<div id="leftcol-rule"></div>
<ul>
<li>برای سفارش و خرید محصولات بر روی لینک خرید پستی کلیک کنید.</li>
<li>سفارش خود را به اطرافیان اطلاع دهید تا در عدم حضور شما
محصول را دریافت کنند.</li>
<li>زمان تحویل محصول شما بین 2 تا 4 روز کاری است.</li>
<li>کلیه محصولات شامل پشتیبانی و گارانتی است.</li>
<li>در صورت تاخیر در تحویل محصول از ثبت مجدد سفارش خودداری
کنید.</li>
</ul>
<?php if (have_posts()) : ?>
<div id="leftcol-news"></div>
<?php while (have_posts()) : the_post(); ?>
<div id="leftcol-body">
<div id="leftcol-col">
<?php
$postimg = get_post_meta($post->ID, "postimg", true);
$post_excerpt = $post->post_content;
?>
<?php $price = get_post_meta($post->ID, 'price', true); ?>
<?php $details = get_post_meta($post->ID, 'details', true); ?>
<?php $buy = get_post_meta($post->ID, 'buy', true); ?>
<div id="leftcol-uptext">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</div>
<div id="leftcol-entry">
<p align="center"><img src="<?php echo $postimg; ?>" width="80" height="123" /></p>
<p style="text-align: justify"><?php the_excerpt_rss(); ?></p>
</div>
<div id="leftcol-foot1">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/price.gif" width="10" height="16">
قیمت: <font color="#FF0000"><b><?php echo $price; ?></b></font>
تومان <br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/cd.gif" width="16" height="16">
تعداد: <?php echo $details; ?><br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/hit.gif" width="16" height="11">
كد محصول: <?php the_ID(); ?><br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/cat.gif" width="14" height="14">
دسته بندی: <?php the_category(',') ?></div>
<div id="leftcol-foot2">
<center>
<a target="blank" href="<?php echo $buy; ?>" rel="nofollow">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/buy_cart.gif" width="84" height="17"></a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/details_cart.gif" width="60" height="17"></a>
</center>
</div>
</div>
</div>
<?php endwhile; ?><?php endif; ?>
</div>
</div>
<div id="all-down"></div>
<?php get_footer(); ?>
</div>
</div>
</body>
</html>
كد sidebar :
<div id="rightcol">
<div id="rightcol-up">
<div id="rightcol-uptext">منو فروشگاه</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<li><?php wp_list_pages('title_li='); ?></li>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">دسته بندی محصولات</div>
</div>
<div id="rightcol-body">
<ul><li><?php wp_list_categories('show_count=1&title_li='); ?></li><ul>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">برترین محصولات</div>
</div>
<div id="rightcol-body">
<p align="center">به زودي</p>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">محصولات تصادفی</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<p align="center">به زودي</p>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">جدیدترین محصولات</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<li><?php get_archives('postbypost', 10); ?></li>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">همکاران</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">رهگیری سفارش</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<p align="center">به زودي</p>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">پشتیبانی</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<p align="center">m.websoft [at] gmail.com</p>
</div>
</div>
<div id="rightcol-down"></div>
<div id="rightcol-up">
<div id="rightcol-uptext">اطلاعات فروشگاه</div>
</div>
<div id="rightcol-body">
<div id="righcol-btext">
<?php
$sql = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
echo "<li>» تعداد محصولات : $sql</li>";
?>
<?php
$customers = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
echo "<li>» تعداد مشتريان : $customers</li>";
?>
<?php $admin = $wpdb->get_var("SELECT (username) FROM $wpdb->useronline WHERE username = 'admin-username' AND userid ='1' AND type = 'member'");
if($admin == 'admin-username'){
echo "<li>» وضعيت مدير : ( آنلاين ) <img src='wp-content/themes/shop3/images/online.gif'</li>";
}
else {
echo "<li>» وضعيت مدير : ( آفلاين ) <img src='wp-content/themes/shop3/images/offline.gif'</li>";
};
?>
</div>
</div>
<div id="rightcol-down"></div>
</div>
كد css :
/*
Theme Name : Shop3
Description : WebSoftDownload.Com
*/
body{
margin:0 auto;
background: #D6D7D9;
font:8pt tahoma;
}
img{
border:none;
}
textarea{
border:1px solid #777;
background-color:#fff;
font:8pt tahoma;
color:#777;
}
input{
border:1px solid #777;
color:#777;
background-color:#fff;
font:8pt tahoma;
}
a{
text-decoration:none;
color:#000;
}
a:hover{
text-decoration:none;
color:#FF7800;
}
h1{
font:16px tahoma;
}
h2{
font: 14px tahoma;
}
h3{
font:10px tahoma;
}
h4{
font:8px tahoma;
}
h5{
font:4px tahoma;
}
h6{
font:2px tahoma;
}
ul{
list-style-type:none;
margin:0px;
padding:1px;
}
ul li{
display:block;
background:url(images/arrow.gif) no-repeat right 5px;
padding:0 12px 0 0;
}
li{
padding:0 12px 0 0;
display:block;
background:url(images/cat-arrow.gif) no-repeat right 5px;
margin-right: 8px;
}
#all{
height:auto;
width:820px;
overflow:hidden !important; overflow:visible;
margin:10px auto 10px auto;
}
#all-up{
background:url(images/head-up.gif) no-repeat;
height:15px;
width:820px;
overflow:hidden !important; overflow:visible;
}
#all-body{
background-color:#fff;
height:100%;
width:820px;
overflow:hidden !important; overflow:visible;
}
#all-down{
background:url(images/head-down.gif) no-repeat;
height:15px;
width:820px;
overflow:hidden !important; overflow:visible;
}
#header{
background:url(images/header.gif) no-repeat;
margin:0px 10px 0px 10px;
width:800px;
height:99px;
}
#search{
background:url(images/search.gif) left no-repeat;
float:right;
height:52px;
width:231px;
margin-right:10px;
margin-top:30px;
}
.search-input{
background:none;
height:22px;
width:120px;
color:#000;
border:none;
padding-top:20px;
font-size:8pt;
padding-right: 50px;
}
.search-button{
background:none;
height:30px;
width:30px;
border:none;
padding-top:20px;
padding-right:10px;
cursor:pointer;
}
#rightcol{
height:auto;
width:200px;
float:right;
padding:10px;
color:#404040;
}
#rightcol-up{
background:url(images/rightcol-up.gif) no-repeat;
height:30px;
width:200px;
}
#rightcol-uptext{
font-weight:bold;
color:#777;
text-align:center;
padding:7px;
}
#rightcol-body{
height:auto;
width:198px;
color:#000;
}
#rightcol-btext{
padding:5px;
}
#rightcol-down{
background:url(images/rightcol-down.gif) no-repeat;
height:10px;
width:200px;
padding-bottom:0px;
margin-bottom:10px;
}
#leftcol{
height:auto;
width:570px;
float:right;
padding:10px;
color:#404040;
}
#leftcol-body{
height:auto;
width:570px;
}
#leftcol-col{
float:right;
padding:5px;
height:340px;
width:260px;
border:1px dotted #ccc;
margin:5px;
}
#leftcol-uptext{
font-weight: bold;
height:20px;
width:260px;
text-align:center;
padding-top:5px;
}
#leftcol-entry{
height:200px;
width:260px;
text-align:right;
}
#leftcol-foot1{
margin-top: 13px;
height:70px;
width:260px;
text-align:right;
padding-top:3px;
}
#leftcol-foot2{
height:30px;
width:260px;
text-align:center;
}
#leftcol-rule{
background:url(images/rule.gif) no-repeat;
height:20px;
width:570px;
margin-top:5px;
padding-bottom:5px;
}
#leftcol-news{
background:url(images/news.gif) no-repeat;
height:20px;
width:570px;
margin-top:10px;
padding-bottom:10px;
}
#leftcol-desc{
background:url(images/desc.gif) no-repeat;
height:20px;
width:570px;
margin-top:10px;
padding-bottom:10px;
}
#leftcol-d{
float:right;
padding-top:10px;
padding-bottom:10px;
height:auto;
width:550px;
}
#leftcol-descbody{
float:right;
padding:5px;
height:auto;
width:550px;
border:1px dotted #ccc;
}
#leftcol-desctitle{
font-weight: bold;
height:20px;
width:550px;
text-align:right;
padding-top:5px;
}
#leftcol-descentry{
height:auto;
width:550px;
text-align:right;
}
#leftcol-descfoot1{
height:80;
width:550px;
text-align:right;
}
#leftcol-descfoot2{
height:20;
width:550px;
text-align:right;
margin-bottom:20px;
}
#leftcol-rel{
height:auto;
width:570px;
margin-top:10px;
margin-bottom:10px;
}
#leftcol-relate{
background:url(images/relate.gif) no-repeat;
height:20px;
width:570px;
margin-top:70px;
padding-bottom:10px;
}
#paginate{
float:right;
padding:5px;
height:auto;
width:558px;
border:1px dotted #FF7800;
margin-top:10px;
}
#footer{
height:auto;
width:820px;
text-align:center;
color:#fff;
padding:10px;
}
البته يه كد search.php هست كه نميدونم بدرد ميخوره يا نه! :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>فروشگاه اینترنتی, خرید اینترنتی</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="fa" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" />
<link rel="shortcut icon" type="image/ico" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" />
</head>
<body>
<div dir="rtl">
<div id="all">
<div id="all-up"></div>
<div id="all-body">
<div id="header">
<div id="search">
<form action="../" method="get">
<input type="text" name="s" id="s" value="" size="20" class="search-input" />
<input type="submit" name="btnSubmit" id="btnSubmit" value="" class="search-button" />
</form>
</div>
</div>
<?php include (TEMPLATEPATH . '/sidebar.php'); ?>
<div id="leftcol">
<div id="leftcol-rule"></div>
<ul>
<li>برای سفارش و خرید محصولات بر روی لینک خرید پستی کلیک کنید.</li>
<li>سفارش خود را به اطرافیان اطلاع دهید تا در عدم حضور شما
محصول را دریافت کنند.</li>
<li>زمان تحویل محصول شما بین 2 تا 4 روز کاری است.</li>
<li>کلیه محصولات شامل پشتیبانی و گارانتی است.</li>
<li>در صورت تاخیر در تحویل محصول از ثبت مجدد سفارش خودداری
کنید.</li>
</ul>
<?php if (have_posts()) : ?>
<div id="leftcol-news"></div>
<?php while (have_posts()) : the_post(); ?>
<div id="leftcol-body">
<div id="leftcol-col">
<?php
$postimg = get_post_meta($post->ID, "postimg", true);
$post_excerpt = $post->post_content;
?>
<?php $price = get_post_meta($post->ID, 'price', true); ?>
<?php $details = get_post_meta($post->ID, 'details', true); ?>
<?php $buy = get_post_meta($post->ID, 'buy', true); ?>
<div id="leftcol-uptext">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</div>
<div id="leftcol-entry">
<p align="center"><img src="<?php echo $postimg; ?>" width="80" height="123" /></p>
<p style="text-align: justify"><?php the_excerpt_rss(); ?></p>
</div>
<div id="leftcol-foot1">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/price.gif" width="10" height="16">
قیمت: <font color="#FF0000"><b><?php echo $price; ?></b></font>
تومان <br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/cd.gif" width="16" height="16">
تعداد: <?php echo $details; ?><br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/hit.gif" width="16" height="11">
كد محصول: <?php the_ID(); ?><br>
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/cat.gif" width="14" height="14">
دسته بندی: <?php the_category(',') ?></div>
<div id="leftcol-foot2">
<center>
<a target="blank" href="<?php echo $buy; ?>" rel="nofollow">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/buy_cart.gif" width="84" height="17"></a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/images/details_cart.gif" width="60" height="17"></a>
</center>
</div>
</div>
</div>
<?php endwhile; ?><?php endif; ?>
</div>
</div>
<div id="all-down"></div>
<?php get_footer(); ?>
</div>
</div>
</body>
</html>
لطفا راهنمايي كنيد يا كد بازسازي شده رو بديد
باتشكر
حل نشده