رفتن به مطلب

نمایش خبر مهم با رنگی دیگر


ok_siavash

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

یک زمینه دلخواه ایجاد می کنید فرضا با نام important و برای مطالب مهم بهش مقدار می دید

و کوئریتون رو اینجوری تغییر می دید


<!-- Start Latests News -->
<div> <!-- Start Title -->
<div style="width: 100%;"> <a href="#" class="tab_btn tab_btn_active" id="latest_news_btn">آخرين اخبار</a>
<div class="tab_sep"></div>
<a href="#" class="tab_btn" id="most_visited_btn">عکس و فیلم</a>
<div class="wrapper"></div>
</div>
<!-- End Title -->
<!-- Start Content -->
<div class="l_column_content" id="latest_news_content">
<?php query_posts('showposts=39'); if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
$important = get_post_meta($post->ID, 'important');
if(!empty($important)) {
$important_color = 'red';
$important_text = '<span>اخبار مهم</span>';
}
else {
$important_color = '';
$important_text = '';
}
?>
<div style="margin-bottom: 4px; text-align: right; direction: rtl;" class="tpl5"> <a class="title4" href="<?php the_permalink(); ?>" title="<?php the_time('j F Y') ?>" target="_blank">
<?php echo $important_text;?><?php echo '<font color="'.$important_color.'">' . get_the_title() . '</font>';?>
</a> </div>
<?php endwhile;?>
<?php endif; wp_reset_query(); ?>
</div>
<div class="l_column_content" id="most_visited_content" style="display: none;">
<?php query_posts('showposts=10&cat=13,108,11'); if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div style="margin-bottom: 4px; text-align: right; direction: rtl;" class="tpl5"> <a class="title4" href="<?php the_permalink(); ?>" title="<?php the_time('j F Y') ?>" target="_blank">
<?php the_title(); ?>
</a> </div>

لینک به ارسال

یک زمینه دلخواه ایجاد می کنید فرضا با نام important و برای مطالب مهم بهش مقدار می دید

و کوئریتون رو اینجوری تغییر می دید


<!-- Start Latests News -->
<div> <!-- Start Title -->
<div style="width: 100%;"> <a href="#" class="tab_btn tab_btn_active" id="latest_news_btn">آخرين اخبار</a>
<div class="tab_sep"></div>
<a href="#" class="tab_btn" id="most_visited_btn">عکس و فیلم</a>
<div class="wrapper"></div>
</div>
<!-- End Title -->
<!-- Start Content -->
<div class="l_column_content" id="latest_news_content">
<?php query_posts('showposts=39'); if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
$important = get_post_meta($post->ID, 'important');
if(!empty($important)) {
$important_color = 'red';
$important_text = '<span>اخبار مهم</span>';
}
else {
$important_color = '';
$important_text = '';
}
?>
<div style="margin-bottom: 4px; text-align: right; direction: rtl;" class="tpl5"> <a class="title4" href="<?php the_permalink(); ?>" title="<?php the_time('j F Y') ?>" target="_blank">
<?php echo $important_text;?><?php echo '<font color="'.$important_color.'">' . get_the_title() . '</font>';?>
</a> </div>
<?php endwhile;?>
<?php endif; wp_reset_query(); ?>
</div>
<div class="l_column_content" id="most_visited_content" style="display: none;">
<?php query_posts('showposts=10&cat=13,108,11'); if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div style="margin-bottom: 4px; text-align: right; direction: rtl;" class="tpl5"> <a class="title4" href="<?php the_permalink(); ?>" title="<?php the_time('j F Y') ?>" target="_blank">
<?php the_title(); ?>
</a> </div>

فوق العاده

ممنون از بزرگواری شما :wub:

لینک به ارسال

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

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

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

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

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

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

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

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

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