If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
is it possible to change the Sidebar News Widget so it will display random posts/images of the defined category instead of sorting them by date (which is the actual behavior)?
Thanks in advance
you can open up habitat>framework>theme_widgets>sidebar_news.php and find:
$additional_loop = new WP_Query("cat=".$cat."&posts_per_page=".$count);
replace it by:
$additional_loop = new WP_Query("cat=".$cat."&orderby=rand&posts_per_page=".$count);
The topic ‘Sidebar News Widget for Random Posts’ is closed to new replies.