رفتن به مطلب

مشکل در کد مطالب دسته ها


پست های پیشنهاد شده

سلام مشکل این کدها کجاست هر دو دیو دسته شماره 1 را نمایش می دهد در صورتیکه column2 باید دسته با آی دی 2 را نمایش دهد


<div class="column1">
<div class="contain1">
<!-- BEGIN -->
<?php $cat = new WP_query(); $cat->query('showposts='.$mytheme['cat1posts'].'&cat='.$mytheme['cat1ID'].',-'.$mytheme['featured']); ?>
<h2 class="front"><?php print get_cat_name($mytheme['cat1ID']); ?></h2>
<ul class="cat">
<?php while ($cat->have_posts()) : $cat->the_post(); ?>
<li>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="fpost">
<a href="<?php the_permalink(); ?>"><?php show_thumb_f($width=$mytheme['cat1W'],$height=$mytheme['cat1H'],$crop='T',$quality=95,$blank=false); ?></a>
<p><?php the_excerpt_reloaded($mytheme['cat1excerpt'], '<a>', 'none', FALSE); ?><a href="<?php comments_link(); ?>" class="icomment"><?php comments_number('0 نظر','1 نظر','% نظر'); ?></a></p>
</div><div class="clear"></div>
</li>
<?php endwhile; ?>
</ul>
<h3 class="front"><a href="<?php print get_category_link($mytheme['cat1ID']); ?>">مطالب بیشتر<?php print get_cat_name($mytheme['cat1ID']); ?></a>
<a href="<?php print get_category_feed_link($mytheme['cat1ID'], ''); ?>" class="feedrss"></a></h3>
<?php $morep = new WP_query(); $morep->query('showposts='.$mytheme['cat1more'].'&cat='.$mytheme['cat1ID'].',-'.$mytheme['featured'].'&offset='.$mytheme['cat1posts']); ?>
<ul class="more">
<?php while ($morep->have_posts()) : $morep->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<!-- DONE -->
</div>
</div>
<div class="column2">
<div class="contain1">
<!-- BEGIN -->
<?php $cat = new WP_query(); $cat->query('showposts='.$mytheme['cat2posts'].'&cat='.$mytheme['cat2ID'].',-'.$mytheme['featured']); ?>
<h2 class="front"><?php print get_cat_name($mytheme['cat2ID']); ?></h2>
<ul class="cat">
<?php while ($cat->have_posts()) : $cat->the_post(); ?>
<li>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="fpost">
<a href="<?php the_permalink(); ?>"><?php show_thumb_f($width=$mytheme['cat2W'],$height=$mytheme['cat2H'],$crop='T',$quality=95,$blank=false); ?></a>
<p><?php the_excerpt_reloaded($mytheme['cat2excerpt'], '<a>', 'none', FALSE); ?><a href="<?php comments_link(); ?>" class="icomment"><?php comments_number('0 نظر','1 نظر','% نظر'); ?></a></p>
</div><div class="clear"></div>
</li>
<?php endwhile; ?>
</ul>
<h3 class="front"><a href="<?php print get_category_link($mytheme['cat2ID']); ?>">مطالب بیشتر<?php print get_cat_name($mytheme['cat2ID']); ?></a>
<a href="<?php print get_category_feed_link($mytheme['cat2ID'], ''); ?>" class="feedrss"></a></h3>
<?php $morep = new WP_query(); $morep->query('showposts='.$mytheme['cat2more'].'&cat='.$mytheme['cat2ID'].',-'.$mytheme['featured'].'&offset='.$mytheme['cat2posts']); ?>
<ul class="more">
<?php while ($morep->have_posts()) : $morep->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<!-- DONE -->
</div>

لینک به ارسال

درود.

تنظیمات کوئری از تنظیمات قالب خوانده می شود بهتر از به پنل تنظیمات پوسته مراجعه نمایید و چک کنید ببنید شماره چه دسته ای وارد شده است

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...