Attention: This modification requires WP3.1+. It won't work with WP 3.0.x or WP2.x !!!!!
Open up /framework/theme_widgets/sidebar_news.php and find following code:
$additional_loop = new WP_Query("cat=".$cat."&posts_per_page=".$count);
Change it to:
if (!empty($cat))
{
$array_cat = explode(",", $cat);
$myquery = array(
'posts_per_page'=> $count,
'tax_query' => array(
array(
'taxonomy' => 'portfolio_entries',
'field' => 'id',
'terms' => $array_cat ,
'operator' => 'IN'
)
)
);
}else{
$myquery = 'post_type=portfolio&taxonomy=portfolio_entries&posts_per_page='.$count;
}
$additional_loop = new WP_Query($myquery);
If you want to use the sidebar news widget AND a portfolio items widget you must duplicate the widget file. First make a copy of sidebar_news.php located under /framework/theme_widgets and name the copy sidebar_portfolio.php
Then replace all occurrences of
kriesi_sidebar_news_widget
with:
kriesi_sidebar_portfolio_widget
(ignore lower/uppercase).
At least replace following code in functions.php:
$autoload['widgets'] = array('sidebar_news');
with:
$autoload['widgets'] = array('sidebar_news', 'sidebar_portfolio');














