Solved

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

Posted on 2008-06-25
5
277 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part I (http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8410-Getting-Started-In-WordPress-Part-I.html), I introduced you to the powerful WordPress backend, the WordPress administrative Dashboard.  In Part II, I will introduce yo…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

914 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

12 Experts available now in Live!

Get 1:1 Help Now