• hi guys
    i create two tabs for each category
    tab-1: order posts in category by date ..
    tab-2: order posts by post_views_count
    i try this code but the probleme #page 2 witch dublicate the same result of the first page for both tab ..
    note: i put the loop in loop.php

    <div id="tabcontent">
        <div class="tab-content">
            <div class="tabsPosts">
                <?$categoryvariable = $cat;
                $args = array(
                'cat'        => $categoryvariable,
                );
                query_posts( $args );?>
                <?php require TEMPLATEPATH . '/loop.php';?>
    		</div>
    	</div>
        <div class="tab-content" id="tab-2">
            <div class="tabsPosts">
                <?$categoryvariable = $cat;
                $args = array(
    	        'cat'            => $categoryvariable,
                'meta_key'      => 'post_views_count',
    	        'orderby'        =>'meta_value_num',
    	        'order'          => 'Desc',
                );
                query_posts( $args );?>
                <?php require TEMPLATEPATH . '/loop.php';?>
            </div>
        </div>
    </div>

    so can any one help me with this

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘order posts with two loops’ is closed to new replies.