Is it possible to use the Sidebar News widget to display the Portfolio posts. I entered the category id of the portfolio posts but it’s not working. I guess it’s only working for normal post types.
Is there a way to do this?
You can do this but would need to adapt the widgets code to use the Portfolio Custom Post Type.
Open up /framework/theme_widgets/sidebar_news.php and find this line:
$additional_loop = new WP_Query("cat=".$cat."&posts_per_page=".$count);
Change it to:
$additional_loop = new WP_Query("post_type=portfolio&cat=".$cat."&posts_per_page=".$count);
This will now only pull in posts from the Portfolio section.
how can i manage it to get the sidebar news widget and the modified sidebar news widget called portfolio widget or something like this?
When im going to copy the sidebar_news.php and modifiy the code – the widget wont appear.
i need them both! :)
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
At least replace following code in functions.php:
$autoload['widgets'] = array('sidebar_news');
$autoload['widgets'] = array('sidebar_news', 'sidebar_portfolio');
hello, i’m interesting on this too
i would like to show just the title of the portfolio categories, how can i do this?
Tnks in advance
The topic ‘Sidebar Portfolio instead of Sidebar News’ is closed to new replies.