Order by date (2 posts)

  1. crespil
    Posted 4 years ago #

    Hi everyone, i´m developing my site in WP with Deadline Theme.

    This theme has a latest post slider and i´d like to filter some categories in this slider.

    I´m usin this code:

    <?php /* show the latest post in the feature box */
    $tz_latest_post = new WP_Query(); $tz_latest_post->query('cat=-10&caller_get_posts=1&posts_per_page=' . $tz_latest_number . ''); ?>

    Categorie ID=10 is not showed as what i want, but... now the slider show older entries fisrt.

    How can i fix it? I need to filter one or several categories and show newest entries first.

    Thanks in advance everyone.

    [Please post code snippets between backticks or use the code button.]

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    <?php /* show the latest post in the feature box */
    $args = array(
    	'cat' => -10,
    	caller_get_posts => 1,
    	'posts_per_page => $tz_latest_number
    $tz_latest_post = new WP_Query($args);

Topic Closed

This topic has been closed to new replies.

About this Topic