<div class="fl sidebar">
    <div class="box">
        <div class="hd"><i class="fr icon"></i><h4>دسته بندی</h4></div>
        <div class="clr"></div>
        <div class="slidebar_menu">
            <ul>
                <?php if (function_exists('put_cat_icons')) put_cat_icons( wp_list_categories('echo=0')); else wp_list_categories('hide_empty=0&title_li'); ?>
            </ul>
        </div>
        <div class="clr"></div>
    </div>
    <div class="lt"></div>
    
    
    <div class="box post_random">
        <div class="hd"><i class="fr icon"></i><h4>پربازدیدترین های هفته</h4></div>
        <div class="clr"></div>
        <div class="sbox" style="text-align: center;">
            <ul>
                <?php 
                    $args = array(
                        'date_query' => array(array('column' => 'post_date_gmt','after' => '1 month ago',),)
                        ,'post_type' => 'post','posts_per_page' => 10,'orderby' => 'meta_value_num','meta_key' => 'views','order' => 'DESC',);
                    $my_query = new WP_Query( $args );
                    while ($my_query->have_posts()): $my_query->the_post(); $do_not_duplicate = $post->ID;
                ?>
                    <li>
                        <?php
                            if ( get_the_post_thumbnail($post_id) != '' ) {
                                echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">';
                                    the_post_thumbnail();
                                echo '</a>';
                            } else {
                                echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">';
                                    echo '<img src="';
                                        echo catch_that_image();
                                    echo '" alt="';the_title() ; echo'" />';
                                echo '</a>';
                            }
                        ?>
                        <div class="inf ler">
                            <h4><a href="<?php the_permalink() ?>" rel="bookmark" ><?php the_title(); ?></a></h4>
                        </div>
                    </li>
                <?php endwhile;wp_reset_postdata(); ?>
            </ul>
            <div class="clr"></div>
        </div>
        <div class="clr"></div>
    </div>    
    <div class="lt"></div>
    
    
    <div class="box post_random">
        <div class="hd"><i class="fr icon"></i><h4>آموزش های اندروید</h4></div>
        <div class="clr"></div>
        <div class="sbox" style="text-align: center;">
            <?php $recent = new WP_Query("cat=1&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
                <?php
                    if ( get_the_post_thumbnail($post_id) != '' ) {
                        echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">';
                            the_post_thumbnail();
                        echo '</a>';
                    } else {
                        echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">';
                            echo '<img src="';
                                echo catch_that_image();
                            echo '" alt="';the_title() ; echo'" />';
                        echo '</a>';
                    }
                ?>
                <div class="inf ler">
                    <h4><a href="<?php the_permalink() ?>" rel="bookmark" ><?php the_title(); ?></a></h4>
                </div>
                <div class="clr"></div>
            <?php endwhile;wp_reset_postdata(); ?>
        </div>
        <div class="clr"></div>
    </div>    
    <div class="lt"></div>

    <div class="box post_random">
        <div class="hd"><i class="fr icon"></i><h4>آرشیو ماهیانه</h4></div>
        <div class="clr"></div>
        <div class="slidebar_menu">
            <ul>
                <?php if (function_exists('wp_get_jarchives')) { ?>
                    <?php wp_get_jarchives('type=monthly'); ?>
                <?php } else { ?>
                    <?php wp_get_archives('type=monthly'); ?>
                <?php } ?>
            </ul>
            <div class="clr"></div>
        </div>
        <div class="clr"></div>
    </div>    
    <div class="lt"></div>
    
    <div class="clr"></div>
    <div class="lm"></div>
</div>