Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-25
5
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Expert Comment

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

Accepted Solution

by:
dosth earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

721 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