Solved

the posts are ASC how i can change  the posts sort to desc

Posted on 2008-06-25
5
275 Views
Last Modified: 2013-12-12
Dear experts
i use the wordpress , i notes that the posts sorts are ASC  the first posts appear first , how i can change the sort to be desc  (last post first) , i enterd to the setting and change the appearance of the posts but it still show me the first posts first , i think there is some change on the PHP code .

thank u
0
Comment
Question by:faresahmad
  • 2
5 Comments
 
LVL 6

Expert Comment

by:mmarth
ID: 21866842
krsort($array);
0
 
LVL 15

Accepted Solution

by:
dosth earned 500 total points
ID: 21915528
wp-includes\classes.php

line 564 or some thing

if ((empty($q['order'])) || ((strtoupper($q['order']) != 'ASC') && (strtoupper($q['order']) != 'DESC'))) {
                  $q['order']='ASC';
            }

change that to DESC


if ((empty($q['order'])) || ((strtoupper($q['order']) != 'ASC') && (strtoupper($q['order']) != 'DESC'))) {
                  $q['order']='DESC';
            }
0
 
LVL 15

Expert Comment

by:dosth
ID: 21925891
faresahmad, did you try this?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now