Quote:
Originally Posted by CyberSEO
However, there is one thing that no WordPress.org plugin can do. Imagine a station where you frequently import posts from a feed (say, a livecam feed) into WordPress posts or pages, and you want all new posts in the feed to appear at the top of your index pages. For example, the plugin pulls a feed where 7 posts are currently active livecams, so you want them at the top of your main page, but they already exist on your site as old posts imported a week ago. So the plugin has to delete those old posts and re-import them as new ones with new descriptions/statuses and screenshots because they have most likely been updated recently.
The plugin in my signature allows you to do this.
|
Free code:
https://themesdna.com/blog/order-pos...ate-wordpress/
Add to theme's functions.php or use WP Code plugin to insert custom code:
Code:
function themesdna_sort_homepage_posts_by_modified_date( $query ) {
if( $query->is_main_query() && ! is_admin() && $query->is_home() ) {
$query->set( 'orderby', 'modified' );
$query->set( 'order', 'DESC' );
}
}
add_action( 'pre_get_posts', 'themesdna_sort_homepage_posts_by_modified_date' );
More options:
https://webhostinghero.org/wordpress...modified-date/