Nope, that’s about making a list of last updated posts, I am looking to make the last updated posts come at top just like what happens when you publish a new post.
Hi,
Yes correct but in your case or whatever your loop is, you would sort your post listing by the modified filter like so;
[code]
'orderby' => 'modified',
[/code]
Thank you
Sorry, kinda new to WordPress hehe.
First, lets find out which page or area of your site your like to do this on? 🙂
Here, on the front page: http://bit.ly/1OvZhm9
Hi,
This will be slightly hard to do; first you need to locate the file in your template that controls the homepage loop. A look looks similar to this;
<?php
$args = array('cat' => 4);
$category_posts = new WP_Query($args);
if($category_posts->have_posts()) :
while($category_posts->have_posts()) :
$category_posts->the_post();
?>
https://codex.wordpress.org/The_Loop_in_Action <– you can read more on that there.
Now after you locate the loop, you have to modify that loop into something like this;
<?php
$args = array(‘cat’ => 4, ‘orderby’ => ‘modified’);
$category_posts = new WP_Query($args);
if($category_posts->have_posts()) :
while($category_posts->have_posts()) :
$category_posts->the_post();
?>
Let me know if that works. It’s hard because each theme and its loop is coded differently and any wrong doing can really make a mess of the way your post within that area are displayed or break the template. That said, I would do backups of any files you’re about to change.
Thank you,