How to change order(asc/desc) on Latest Post Page ?

March 2014 WordPress Theme
GK User
Fri Jun 19, 2015 9:38 am
We are getting old posts in Latest Post page. We like to reverse order to get Latest post on Latest Post Page.

Please let us how to implement this
User avatar
Fresh Boarder

GK User
Fri Jun 19, 2015 9:48 am
Please edit News2/template.latest.php file and change this line:
Code: Select all
query_posts('posts_per_page=' . $per_page . '&paged=' . $paged );


to:
Code: Select all
query_posts('posts_per_page=' . $per_page . '&paged=' . $paged . '&order=ASC' );
User avatar
Moderator

GK User
Fri Jun 19, 2015 10:05 am
Its working but we need ASC/DESC order by data published(Not Post ID)
User avatar
Fresh Boarder

GK User
Fri Jun 19, 2015 10:12 am
It's ordered by date (default), another order options may be found here:
https://codex.wordpress.org/Class_Reference/WP_Query
User avatar
Moderator

GK User
Mon Jun 22, 2015 8:56 am
By Default it works on which date. Published Date or Last Updated Date ?
User avatar
Fresh Boarder

GK User
Mon Jun 22, 2015 11:26 am
Published date.
User avatar
Moderator

GK User
Tue Jun 23, 2015 11:49 am
By default it brings Featured Post before Latest Posts. How to disable this feature for Featured Posts & get latest posts(no matter they are featured or not)
User avatar
Fresh Boarder

GK User
Tue Jun 23, 2015 1:13 pm
Everything is described here:
https://codex.wordpress.org/Class_Reference/WP_Query
Please add ignore_sticky_posts parameter with 'true' value.
User avatar
Moderator


cron