I want to display online recent posts in the sidebar from spefici category. If I call the news section I want to see online recent posts in the sidebar area from this category and not from all category#s. Same for articles, screenshots and videos category.
Maybe I have to change something in the wg-sidebar.php but what exactly / how.
custom modifications are not included in regular support unfortunately, as suggested in the other ticket I think it's best if you rely on a Sidebar manager plugin instead of changing the code.
Hello,
I want to display online recent posts in the sidebar from spefici category. If I call the news section I want to see online recent posts in the sidebar area from this category and not from all category#s. Same for articles, screenshots and videos category.
Maybe I have to change something in the wg-sidebar.php but what exactly / how.
I thing this is the part ...:
if($sort == 'recent')
{
$posts = get_posts('numberposts='.$items.'&order=DESC&orderby=date&post_type=post&post_status=publish');
$title = __('Recent Posts', 'powermag');
}
else
{
global $wpdb;
$query = "SELECT ID, post_title, post_content FROM {$wpdb->prefix}posts WHERE post_type = 'post' AND post_status= 'publish' ORDER BY comment_count DESC LIMIT 0,".$items;
$posts = $wpdb->get_results($query);
$title = __('Popular Posts', 'powermag');
}
Hi there,
custom modifications are not included in regular support unfortunately, as suggested in the other ticket I think it's best if you rely on a Sidebar manager plugin instead of changing the code.
Regards
djwd
I can import a few if else statements only to check category. It's not to much work ;)