Two New Widgets Released

I threw a couple of new widgets out there for folks to have some fun with.

Featured Blog Tag Cloud and Shortcode
We use this one together with Donncha’s sitewide tags plugin, so we can have a tag cloud on your site’s home page that references the tags from the tags blog. The shortcode just allows you to pass in the ID of the blog you want, otherwise it acts pretty much just like the built-in shortcode, but with the defaults set a little differently – you can set the defaults directly in the code if you prefer different ones.

Featured Blog Widget
This widget lets you pick a featured blog and a featured author within that blog, and it will display the avatar of the featured author and a user-specified number of posts from the blog.

Both of these came out of the work that we were doing on an internal blog server – so they might be a tad bit customized in terms of layout. But, they’re good starting points if you need to do something similar.


20 thoughts on “Two New Widgets Released

  1. Hi Deanna,

    Thanks for the great work on your featured blog widget, I appreciate the work you put into this.

    Would it be possible to not only read the latest blog posting, but to also include say the first 600 words or 15 lines (maybe user specified how much to include) with the post?

    I would like to feature a regular content write and have them write posts to their own blog which is pulled into the main page where visitors can read part of the post and if they like to continue, click the more link.

    Thanks again for the great work :).

    1. It’s fairly easy to do. On line 86, just add the following (ugh code snippets don’t seem to work in comment tags here, so bear with me):

      <?php the_excerpt(“Read the rest of this entry »”); ?>

      That will add an excerpt for each post. If you wanted to customize it more, that would be a bigger issue – not hard just a bit more customizing time. But, that’s the quick and dirty way.

  2. Thanks for the reply Deanna.

    Do I add this before or after the closed li tag?

    That’s currently what I have on line 86 of featured_blog.php

  3. Awesome work Deanna! :). Thank you so much for taking the time to update this plug-in with the feature I asked for.

    Is it possible to have it feed the blog with the paragraph separations intact?

    PS: Do you have a paypal for donations? 😀

  4. I’m using the built-in excerpting functions, and handling it the same way WP does internally. So, probably not. It basically strips the HTML and shortcodes and such so that you don’t break the rest of your site layout by cutting off in the middle of some HTML tag. Sorry.

  5. Hello,

    I have made a french translation for the Featured Blog Widget.

    For doing this, it was necessary to do some hacks on code :

    1. Declare a “texte domain”:
    load_plugin_textdomain( 'cets_featured_blog', 'wp-content/mu-plugins', false );

    2. Introducing on each text strings the call to the “texte domain”. For exemple:
    <a href="">

    3. Correcting a small bug : there was no description text for the widget only twice the title (wpmu… For correcting this I have to hack the cets_widget_featured_blog() function introducing these lines:

    $widget_ops = array('classname' => 'cets_widget_featured_blog', 'description' => __('A widget that pulls the avatar of a user and the most recent posts in headline format from a featured blog', 'cets_featured_blog') );
    $this->WP_Widget( 'cets_widget_featured_blog', __('Featured Blog', 'cets_featured_blog'), $widget_ops, $control_ops );

    If you want to grab the source and the .mo/.po files:

  6. I would love to use this widget on my homepage of but that page itself is not widget ready.

    Do you know of a way I would be able to implement this by adding plugin code rather than making the whole theme widget ready?


    1. Hey Chris,
      I took a look at this today and tried to come up with some clever way to do it. Unfortunately, there’s isn’t anything quick and easy. It would amount to rewriting this all as a plugin instead of a widget. (The widget architecture isn’t designed to be called outside the widget framework.) The good news is that it’s super easy to widgetize your theme. There’s a great tutorial here:

      If you really don’t want to widgetize the theme, then I can give you some pointers on what to do with the widget code. You’re essentially stripping the stuff out of the widget function that begins on line 37 and making a standalone function out of that. The best place to do that would be in the functions.php of your theme. Make sense?

      1. Deanna, I appreciate the effort. No worries, I guess I’ll just have to get with the times and widgetize my theme 🙂



    1. I can probably come up with something, but I’ve been on vacation and today I’m furloughed – so no “working.” I’ll look at it tomorrow.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s