change the posts in the main page from ASC to descending order (latest posts first)

hi experts

i use the wordpress , i need to change the orde of the posts descending (latest posts first) in the main page , what i shall do ? is there are any change in the PHP code ? tell me what is the change and in with file .

thank you
faresahmadAsked:
Who is Participating?
 
James RodgersConnect With a Mentor Web Applications DeveloperCommented:
the code looks fine but try adding this just before the <?php if (have_posts()) : ?> line

<?php query_posts('orderby=date&order=DESC'); ?>
0
 
dosthCommented:
it is a setting, change it directly
<URL removed by request via mail>

check the radio option Your latest posts
0
 
faresahmadAuthor Commented:
ok  i try this put it is not work ,  i edit the blogs to show the last 6 blogs , but it sill not work

thank you
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
dosthCommented:
please delete this question and create, i was not supposed to show the url, please do this for me
0
 
dosthCommented:
dear fares

kindly do this for me, i am in lot of trouble right now

Thanks
Dosth Mohammed
0
 
dosthCommented:
Dear Fares

Can you able to help me with this, i will be thankful to you if you can delete this question working with moderator

Please save my job

thanks
Dosth
0
 
dosthCommented:
sure, the question if fine, i will surely help on this post

Thanks for every one involved in this and i am very thankful

Thanks and thanks a lot

Love EE and will help on things i know for sure.

Thanks again
0
 
faresahmadAuthor Commented:
hi experts
sorry for late , ok i am still need help please
0
 
dosthCommented:
what version you are using?
also can you do a screen shot this pages?

/wp-admin/options-reading.php
/wp-admin/edit.php

my understanding is by default the post are order by date desc



0
 
dosthCommented:
can you get me this screens?
0
 
faresahmadAuthor Commented:
ok this is screen shoot , please notes this is in arabic language not in English
please help me
wordpress.zip
0
 
faresahmadAuthor Commented:
please help
0
 
faresahmadAuthor Commented:
??????????
0
 
dosthCommented:
the only thin i am getting confused is

i dont see this option

http://www.cagintranet.com/archive/howto-wordpress-as-an-easy-cms/

4. Setting the Options

i am seeing this in english version thoug
0
 
faresahmadAuthor Commented:
what i shall do ?
0
 
faresahmadAuthor Commented:
this is option is exist , if you can notes , the first option is show the last posts (in dropdown option)
0
 
dosthCommented:
i see your first post is showing as june 23 08, it means it is showing order by the last post date, am i wrong?
0
 
James RodgersWeb Applications DeveloperCommented:
ok, by default wp orders pages form news to oldes from top to bottom, have you altered the page code? are you using a static front page, custom from page or default fromt page?

in wp-admin under
settings>reading
there are several options first is
Front page displays:
and options are
  your latest posts
  a static page
which have you selected?

if you selected a static page have you selected a page for displaying your posts? is thsi a wordpress page or a page you created?
0
 
James RodgersWeb Applications DeveloperCommented:
since by default wp places p[osts in descending order(newest to oldest) you might have entered some bad code in to a page
did you chane or add to a page the following php code?
query_posts();

maing changes to this command MAY change the way wp processes posts
0
 
dosthCommented:
category/general/
category/s_var/

i see order by date is fine, can you show me where is the problem?
0
 
faresahmadAuthor Commented:
the problem is the the post  in the main page appear ASC not DESC acoording to the dates of posts

 
0
 
faresahmadAuthor Commented:
can you tell me the page that i can change its code ? what is the changs
0
 
James RodgersWeb Applications DeveloperCommented:
post the page code, unless we can see the actual page code its all just guessing
0
 
faresahmadAuthor Commented:
ÿ<?php get_header(); ?>

      <div id="content" class="narrowcolumn">

      <?php if (have_posts()) : ?>
            
            <?php while (have_posts()) : the_post(); ?>
                        
                  <div class="postwrapper" id="post-<?php the_ID(); ?>">

                    <div class="title">
                    
            <div class="datebox"><br /><?php the_time('\<\s\p\a\n\>j\<\/\s\p\a\n\> \<\b\r \/\> M\<\b\r \/\>Y') ?></div>
                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                    </div>
                    <div class="post">
                      <div class="entry">
                        <?php the_content('<!-- Read More -->'); ?>
                          <ul class="buttons">
                           <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">'B1# 'DE2J/ &raquo;</a></li>
                            <li><?php edit_post_link('*-1J1 */HJF)'); ?></li>
                          </ul>
                    </div>
                      <div class="postinfo">
                        <p>(H'37) : <strong><?php the_author() ?></strong><br />
                  <?php comments_popup_link('D' *9DJB'* ', '*9DJB H'-/...', '% *9DJB...'); ?></p>
                          <p>'D#B3'E:</p>
                                <ul class="catlist onecol">
                      <li><?php the_category('</li><li>') ?></li>
                      </ul>
                      </div>
                    </div>
                  </div>
      
            <?php endwhile; ?>
                  <div class="navigation">
                  <div class="alignleft"><?php next_posts_link('&laquo; 'DEH'6J9 'D3'(B)') ?></div>
                  <div class="alignright"><?php previous_posts_link(''DEH'6J9 'DD'-B) &raquo;') ?></div>
            </div>
      <?php else : ?>

            <div class="title">
              <h2>:J1 EH,H/</h2>
            </div>
            <p class="center">'D5A-) 'D*J 7D(*G' :J1 EH,H/).</p>
            <?php include (TEMPLATEPATH . "/searchform.php"); ?>

      <?php endif; ?>
      
      
  </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

------------------------------------------
this is the code of the main page

thank u  very much
0
 
faresahmadAuthor Commented:
please notes that ther are some word in arabic in this code  .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.