Is there a way to bring, automaticaly, an old edited/modified post in the front of page?
More clear, I want that every time when i edit a post to display it in front of my page, like sticky posts or something.
Is that possible?
Edit
First, thanks for your promptly answer!
Yes, in part this is it, but it's not exactly what I want.
This function add posts in front of my page and it's OK:
<?php query_posts($query_string . '&orderby=modified&order=desc'); ?>
but, in addition, I would like this to happen in sidebar too, in "recent posts widget" and in "Featured Posts Grid", it's the Featured Content Slider that i use it.
This function doesn't work for me, i don't know why:
<?php
function wpse10691_alter_query( $query )
{
if ( $query->is_main_query() && ( $query->is_home() || $query->is_search() || $query->is_archive() ) )
{
$query->set( 'orderby', 'modified' );
$query->set( 'order', 'desc' );
}
}
add_action( 'pre_get_posts', 'wpse10691_alter_query' );
?>
query_postsit's over-riding what you set atpre_get_posts. – Stephen Harris Aug 13 '12 at 13:30