Category Posts Widget 1.2.1
By request, I added an option to make the widget title a link to the category page. You can turn this option on and off in the configuration dialog of the widget. It’s a simple checkbox.
I’ll add an option for post excerpts in the near future when I get my main laptop up and running again. I coded this feature on my secondary laptop which doesn’t have my usual coding software.
You can download the new plugin here at the WordPress plugin repository.
Also note that I’m closing comments on the other posts about Category Posts Widget because it’s becoming hard to keep track of them all across several different posts.
Posted on March 25, 2008 / 1:30am in Code

James,
Installed WP 2.5 the other day and am just now figuring out what’s what.
I installed the last version of CPW under WP 2.3 and everything worked as it should. That is I could move the widgets to and from active use, access them to change the parameters etc.
Today I auto-upgraded to CPW 1.21. Thnking I might change some of the parameters, I went to the admin widgets section in WP. Whoa!
I have a list of the active widgets, and can add others. But there is no way to delete, move or access any of them.
They appear as a list in a gray bar.
I do not know if it’s the WP upgrade or your CPW 121 or combo.
If you have any insights let me know,
Thanks in advance
Chris
Hi Chris, they reworked the widget admin for WordPress 2.5 as you can see. I was a little confused too.
It almost seems like a downgrade in terms of functionality, but it looks a lot cleaner and seems more stable. To change the options for a widget or deactivate it, click the little edit link on the right of each active widget (the blue widgets on the right).
Hope that helps.
Hi
Your Category Posts Widget might be just perfect for my use, but I wonder:
Is it somehow possible to make the widgets show up in the sidebar of a category’s posts - or even better: Both in the category’s overview page and in its posts?
(To increase the number of widgets I’d need i believe I just have to adjust the lines 90, 106 and 109?)
Thanks in advance
Kjetil
(still on 2.3.3)
Should have added an example link:
http://www.dolcevita.no/wp/category/basilicata/
Click one of the local places - I really would like to see the widget both places.
(By the way, I never assign more than one category to a post)
Thanks
“Hi Chris, they reworked the widget admin for WordPress 2.5 as you can see. I was a little confused too.
It almost seems like a downgrade in terms of functionality, but it looks a lot cleaner and seems more stable. To change the options for a widget or deactivate it, click the little edit link on the right of each active widget (the blue widgets on the right).”
James,
No. That is what I would also expect, but alas no cigar. Perhaps I didn’t explain the problem very well.
Activating CPW only places the CPW below the blue bar with “How many category posts widgets would you like?” Number, Save button. Deactivating CPW merely removes this option. Nothing else changes.
The various widgets which are active - example: whoa I just went to paste the text: Pages (in a gray horizontal rectangle) followed by “Your blog’s WordPress Pages” and no edit button (or anything else visible) but instead got the actual code - this is very odd!
begin paste:
Pages Edit
* Pages Edit Title: Sort by: Page title Page order Page ID Exclude: Page IDs, separated by commas. Change Remove
Your blog’s WordPress Pages
end paste.
There is nothing clickable anywhere in the interface for the Pages widget, but apparently I can (somehow) by selecting the text copy the underlying code.
Inactive widgets have clickable text “Add”. There are no other options. The theme Neoclassical v1.1 is listed as compatible with WP 2.5. It is also not possible to reposition any ofthe widgets. I see only the vertical list of widgets as simple text, followed by the widget’s text description.
How do you like them apples?
I’ve seen elsewhere that removing one or more of 2.5’s files and then reinstalling that file will fix other problems - perhaps that is the case here as well?
Chris
opps the code didn’t come out will try again
* |h4 class=”widget-title”|Pages |a class=”widget-action widget-control-edit” href=”/pif5/wp-admin/widgets.php?edit=pages&key=no-key”|Edit|/a| |/h4| |div class=”widget-control”| |p||label for=”pages-title”|Title: |input class=”widefat” id=”pages-title” name=”pages-title” type=”text” value=”" /||/label||/p| |p| |label for=”pages-sortby”|Sort by: |select name=”pages-sortby” id=”pages-sortby” class=”widefat”| |option value=”post_title”|Page title|/option| |option value=”menu_order” selected=”selected”|Page order|/option| Page IDs, separated by commas.|/small| |/p| |input type=”hidden” id=”pages-submit” name=”pages-submit” value=”1″ /|<input type=”hidden” name=”widget-id[]” value=”pages” /| |input type=”hidden” class=”widget-width” value=”250″ /| |div class=”widget-control-actions”| |a class=”widget-action widget-control-save wp-no-js-hidden edit alignleft” href=”#save:pages”|Change|/a| |a class=”widget-action widget-control-remove delete alignright” href=”/pif5/wp-admin/widgets.php?remove=pages&key=no-key&_wpnonce=55e016fbe6″|Remove|/a| |br class=”clear” /| |/div| |/div|
Your blog’s WordPress Pages
When I include the code on a simple html page, it comes out correctly - as you would expect and as you can see from the above post - there is soomethng amiss here and I cannot see what it might be.
James,
I think I’ve fixed it!! At least I can now use your plugin as expected.Was my fault - kept overlooking that was a choice between sidebar (1) left and sidebar (2) right. I only use the right side bar. Switching to 2 fixed it. Thanks any way sorry for the ignorance but what about coping the code - interesting eh?
Hi there,
I am really happy with your plugin, then I upgraded to 2.5. and a mysterious and non-deletable category appeared called Main weblog. It appears as a tag on my pages (I am using Simple Tags), and when clicked on, it gives me NOT FOUND, so I have added this little text to whoever clicks it:
Sorry, but you are looking for something that isn’t here. If you clicked on “Main weblog” in Tags attached to a post, don’t worry. It is a default tag/category, and therefore empty on this site. All other tags are active and functioning. Use the Search Box if in doubt.
Nevin publishers
Now, I have put your Added Options Main Weblog into the mix, with 5, but because I have no posts in Main weblog (and I can’t figure out how to include pages in that category, cat=1, I am stumped! What can I do to get rid of the Main weblog tag/cat=1, or how can I make the tag operational?
Many thanks in advance.
Nevin, I’m not sure what you are referring to or how this relates to my Category Posts Widget.
Hi
Thanks for a great plugin - together with WidgetLogic it does exactly what I need.
Now, I wonder how I can get more widgets. I’ve adjusted the code in eg Daikos Text widget to get up to 29 instead of 9 widgets, but I can’t figure out which lines to alter in the Category post plugin.
(In the other I basically could replace some 9’s with 29, but I can’t find anything like that in your plugin. I’ve tried to alter lines 77,90,106 and 109 - but no luck)
As you see I’m no hand-coder, so I would really appreciate a tip from you.
Thanks,
Kjetil Flekkoy
…and on some posts/pages I’d need a longer list than 15 posts - but it seems that it works by changing the 15’s in the lines 26 and 62 from 15 to eg 25, right?
Kjetil
PS Have a couple of beers for your effort!
It worked! - Just mixed up something.
Any news about WP25 upgrade?
Congrats Kjetil. And yes, there will be a WP2.5 upgrade soon.