Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4548

    In this Newscast theme when I assign posts to the category called Home they show in reverse order. Even if I change the dates, the order still remains the same. I excluded all other categories from the home page so that only Home category posts show up. I also had to add a code that displays only sticky posts on home page. Please advise how I can show only specific posts on the Home page. Maybe my approach is not the best one. It’s important that the posts show in correct order, last being topmost.

    Here’s the site.

    http://www.palmbeachlwp.com

    #46749

    Hey,

    in index.php change following code:

    $additional_loop = new WP_Query("cat=".$negative_cats."&paged=$paged");

    if ($additional_loop->have_posts()) :
    while ($additional_loop->have_posts()) : $additional_loop->the_post();

    // ############################# FULL SIZED POSTS #############################

    to:

    $additional_loop = new WP_Query("cat=".$negative_cats."&order=ASC&paged=$paged");

    if ($additional_loop->have_posts()) :
    while ($additional_loop->have_posts()) : $additional_loop->the_post();

    // ############################# FULL SIZED POSTS #############################

    The parameter &order=ASC will order the posts in ascending order, if you change it to &order=DESC all posts will be displayed in desc. order.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Posts on home page are in strange order’ is closed to new replies.