رفتن به مطلب

Mohammad

عضو سایت
  • تعداد ارسال‌ها

    647
  • تاریخ عضویت

  • آخرین بازدید

  • روز های برد

    1

نوشته‌ها ارسال شده توسط Mohammad

  1. بفرمایید:


    <div id="amazon_scroller1" class="amazon_scroller">
                            <div class="amazon_scroller_mask">
                                    <ul>
    <?php
    $the_query = new WP_Query('cat=1&showposts=5&orderby=post_date&order=desc');
    while ($the_query->have_posts()) : $the_query->the_post(); ?>
    <div class="twentyten-latest-post">
    <li><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail(array(50,50), array ('class' => 'classax')); ?>
    </a></li>
    <div class="clear"></div>
    </div>

    <?php endwhile; ?>
    <?php wp_reset_query(); ?>
    </li>    
                                    </ul>
                            </div>
                            <ul class="amazon_scroller_nav">
                                   
                                   
                            </ul>
                            <div style="clear: both"></div>
                 
      </div>

    به جای cat ای دی دسته رو وارد کنید.

    • امتیاز 2

  2. <div id="mortabt"><h3>
              مطالب مرتبط:
            </h3>
    <ul><marquee  direction="up" id="mortabet" height="auto" behavior="alternate" onmouseout="this.start()" onmouseover="this.stop()" scrollamount="1" scrolldelay="1"> 
    <?php
      $backup = $post;
      $tags = wp_get_post_tags($post->ID);
      $tagIDs = array();
      if ($tags) {
                    $tagcount = count($tags);
                    for ($i = 0; $i < $tagcount; $i++) {
                      $tagIDs[$i] = $tags[$i]->term_id;
                    }
                    $args=array(
                      'tag__in' => $tagIDs,
                      'post__not_in' => array($post->ID),
                      'showposts'=>10,
                      'caller_get_posts'=>1
                    );
                    query_posts($args);
                    if( have_posts() ) {
                      while (have_posts()) : the_post(); ?>
                                    <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); } ?>; ?>" target="_blank"><?php the_title(); ?></a> (<?php if(function_exists('the_views')) { the_views(); } ?>)</li>
                      <?php endwhile;
                    } else { ?>
                      <li>مطلب مرتبطی برای این موضوع وجود ندارد.</li>
                    <?php }
      }
      $post = $backup;
      wp_reset_query();
    ?>
    </marquee></ul>
    </div>

    • امتیاز 2
×
×
  • اضافه کردن...