Support » Themes and Templates » data orderby issue with WordPress 3.5

  • Our code for showing recent posts worked fine with versions of WordPress previous to 3.5, but now it appears to be showing a random selection of recent posts:

    <?php wp_reset_query();
    $args = array(‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘posts_per_page’=>25,’paged’ => get_query_var(‘paged’));
    query_posts($args);

    $postnum=”0″ ?>

    Anyone else seeing any similar issues with WordPress 3.5? Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Please see this.

    Emil

    Thread Starter keithnet

    (@keithnet)

    Thanks.

    Unfortunately, if I change it to this:

    <?php
    
    	// The Query
            $args = array('orderby' => 'date', 'order' => 'DESC', 'posts_per_page'=>25,'paged' => get_query_var('paged'));
    	$the_query = new WP_Query( $args );
    
    	// The Loop
    	while ( $the_query->have_posts() ) :
    		$the_query->the_post();
    		echo '
    <li>' . get_the_title() . '</li>
    ';
    	endwhile;
    
    	// Restor original Query & Post Data
    	wp_reset_query();
    	wp_reset_postdata();
    
    	?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    I still get the incorrectly ordered data.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘data orderby issue with WordPress 3.5’ is closed to new replies.