My blog posts are showing oldest to newest and the default in WordPress is newest to oldest which is what I want. I tried a few plugins but none worked. One thing I tried was changing themes and the blog posts showed in the default. How can I change the theme to show the post order newest published date to oldest publish date? Would be nice if we could use the presets for the home page design on any page.
I really need some help with this.
Does anyone from PremiumPress look at these posts on a regular basis????
Hello Glenn In your Theme directory open the file tpl-blog.php and locate this line: $posts = query_posts(“paged=”.$paged.”&post_type=post”); replace it with [code title=””] $posts = query_posts(“paged=”.$paged.”&post_type=post&orderby=date&order=desc”); [/code]
I gave that a try and still have the code there. It did not have any affect on the blog at all. Any other suggestions?
you may need;
I also deactivate all the plugins but that did not affect the sorting either.
Mark, Are you saying the line should look like this? $posts = query_posts(“paged=”.$paged.”&post_type=post&orderby=post_date&order=asc”);
I tried that but did not change anything.
Do I need to do a ticket for this??
Hi, were you able to get this resolved ? I am having a similar issue and would like to know if/how you got this resolved. Thanks! Jonathan
Guys this code is for older themes. How do I accomplish this in the newest theme version 8.9.6?
The code mentioned above looks different in the new tpl-blog.php
Right now posts are being sorted by updated date instead from newest to oldest
thanks in advance Mike
Hello Mike, Your code should be: $args = array( 'post_type' => 'post', 'posts_per_page' => 15, 'paged' => $paged, 'orderby' =>post_date, 'order' =>asc, );
$args = array( 'post_type' => 'post', 'posts_per_page' => 15, 'paged' => $paged, 'orderby' =>post_date, 'order' =>asc, );
I tried making the suggested change for 8.9.6 and it made no difference. Blog posts are still shown oldest to newest. Any ideas?
where did you added the code?
Start your new website today!