• 30-07-2013, 19:10:48
    #1
    Merhaba arkadaşlar kolay gelsin;
    TÜM ŞAMPİYONLAR dan sonra yazıların eskiden yeniye sıralanmasını istiyorum aaraştırdım ama ASC değerini yerleştiremedm
    <?php
    /**
    Template name: Homepage
    */
    
    get_header(); ?>
    
    <div class="latestbar grid_12">
    	<h3>TÜM ŞAMPİYONLAR</h3>
    </div>
    <div class="clear"></div>
    <div class="lyric-list cf">
    	<?php
    		$prodnum= of_get_option('w2f_home_number');
    		
    		if ( get_query_var('paged') )
    		    $paged = get_query_var('paged');
    		elseif ( get_query_var('page') )
    		    $paged = get_query_var('page');
    		else
    		    $paged = 1;
    		$wp_query = new WP_Query(array('post_type' => 'song_lyric', 'posts_per_page' => $prodnum, 'paged' => $paged ));
    		?>
    
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    
    		
    			<div class="lyric-box grid_3">
    				<div class="art-thumb">
    					<?php
    						$thumb = get_post_thumbnail_id();
    						$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
    						$image = aq_resize( $img_url, 220, 220, false ); //resize & crop the image
    					?>
    					<?php if($image) : ?> <a href="<?php the_permalink(); ?>"><img src="<?php echo $image ?>"/></a> <?php endif; ?>
    				</div>
    				
    				<div class="lyric-info cf">
    					
    						<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    						<p> <?php echo get_the_term_list( $post->ID, 'cel_artists', '', ', ', '' ); ?> </p> 
    					
    				</div>
    					
    			</div>
    			
    
    	<?php endwhile; ?>
    
    </div>
    
    <div class="paginate grid_12">
    	<?php kriesi_pagination(); ?>
    </div>
    	
    
    
    <?php get_footer(); ?>


    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 19:10:48 -->-> Daha önceki mesaj 18:18:29 --

    yardım up up
  • 30-07-2013, 19:13:41
    #2
    $wp_query = new WP_Query(array('post_type' => 'song_lyric', 'posts_per_page' => $prodnum, 'paged' => $paged ));
    ?>
    satırını aşağıdaki şekilde değiştirin.

    $wp_query = new WP_Query(array('post_type' => 'song_lyric', 'posts_per_page' => $prodnum, 'paged' => $paged, 'order'=>'ASC' ));
    ?>
  • 30-07-2013, 19:27:30
    #3
    yakup hocam çok teşekkürler çalıştırdım ellerinize sağlık