Featured posts plugin and widget

Featured posts plugin and widget

Here's a plugin complete with a widget that lets the site admin pick and choose which posts to feature. A backend menu is created where the admin can input a sitewide feed. In MU, the menu item is under site Admin, and in regular WordPress, it's under Appearance.

We recommend using this in conjunction with Sitewide tags, then use the feed from the tags blog. Each item from the feed has a checkbox, and when selected, the post is moved over to the "Featured" column. The widget will display the featured post excerpt as well as the user's avatar.

The admin area.
featured posts admin screen

The widget in action.

Currently, if you want to change some options, you will have to edit the code of the plugin. The widget is in a separate file if you wish to remove it. Also, the widget is set to display one post, but that is easily changed by editing the plugin. Find the function call and change it thusly:

<?php ra_featured_show(10); ?>

Where the number 10 is the maximum amount of posts to show. You can also use this same function if you want to hardcode it in your theme. There are also options in the code for default avatar sizes, and some CSS classes around the post and the avatar, so you can adjust them to your liking. Feel free to fold, spindle, mutilate and enjoy the heck out of it. Since we are going to WordCamp New York, we wanted to get this plugin released before then. We'll add more options for backend configuration after we get back.

Download the plugin here.

  • Featured posts plugin and widget – WPMU Tutorials
    Posted at 03:02h, 27 October Reply

    […] from: Featured posts plugin and widget – WPMU Tutorials Comments0 Leave a Reply Click here to cancel […]

  • A List of Awesome WordPress Blogs to Follow
    Posted at 09:39h, 27 October Reply

    […] Featured posts plugin and widget […]

  • Adam W. Warner
    Posted at 10:38h, 27 October Reply

    Whoa, depending on the number of comments I make, I might have to start an andrea fan club site…:)

    This plugin seems pretty cool. I would assume that for a normal blog, one would just enter their own feed address?

  • Hunnas
    Posted at 19:14h, 29 October Reply

    Hey, nice plug-in.

    Would be great to have more back end control on the dashboard like having a group of featured posts that can be randomly displayed?

    Also to be able to add thumbnail images?

    Any chnace you can email me when you make new versions of this plug in so I can update them right away?

    Good job Andrea and team!

  • Hunnas
    Posted at 19:33h, 29 October Reply

    Just a couple of things while I think of it:
    * Be good to include the post author’s details and the posted date under the post heading?
    * Be good to have a check box on the right side of the admin screen selecting which post to display (mine is only displaying one post in the sidebar at the monent?)rather than the post at the top of the list gets displayed.


  • Gordie
    Posted at 21:02h, 04 November Reply

    I wrote another widget that could replace yours.
    You can now have multiple widgets and options for each of them (widget title, number of comments, show link, show avatar).
    Better that way 😉
    Feel free to include it into your plugin, here’s the code :


    Also; there should be an option to choose the avatar size.
    Even better; be able to choose a template to display the posts ! That would be niiice.

  • Gordie
    Posted at 01:46h, 06 November Reply

    As I told you yesterday, I think you should do something for that the user can handle the post as he wants to. Here you are storing your posts (excerpt,etc) in a table but not all the informations are accessible, that’s a problem.

    With this system; only the blog_id & post_id are stored.
    I think that an even better idea would be to store an array of items (blog_id+post_id) in the plugin options. So you don’t even need a table.

    I did something to retrieve the full posts and display them in a template :


    I’m tired now, but it still need some work :

    1-here I put “feature_id as post_id” in the query to try; but you should find a way to store the post_id when saving the featured, then call that field instead of what I put (or using a plugin option as I said before)

    2-setup_postdata allows you to use the template functions like “the_title”, etc.

    3-locate_template gets a template to display the item.

  • Amir
    Posted at 10:41h, 15 December Reply

    Hi Andrea, could you please tell me where to place the files in order to activate the plugin. There are one folder and two files ra-featured-posts, ra-featured-posts.php and ra-featured-posts-widget.php respectively. And where after activation of the plugin where do I get the option of plugin in admin area?

    • andrea
      Posted at 10:55h, 15 December Reply

      I have mine in the mu-plugins folder. There’s no need to activate it as it won;t show up on the Plugins menu.

      To get to the backend menu of it, you’ll find it under the Site Admin menu as Feature Posts.

  • Amir
    Posted at 12:18h, 15 December Reply

    Thanks Andrea, however, this plugin has a conflict with another plugin called wpmu theme stats. If we enable wpmu theme stats plugin while having this plugin activated then we got the following error:

    Fatal error: Cannot redeclare ra_show_hide_begin() in /home/letmeno/public_html/wp-content/mu-plugins/ra-theme-stats.php on line 114

    How to fix this issue?

    • andrea
      Posted at 13:18h, 15 December Reply

      Get the newer version of the theme stats plugin. 🙂

  • Amir
    Posted at 13:17h, 15 December Reply

    Fixed. Change the names of both functions ra_show_hide_en and ra_show_hide_begin. Please take care of this conflict in next versions.

    • andrea
      Posted at 13:28h, 15 December Reply

      Our replies came at the same time – we did fix this in later plugin versions.

  • ezhil
    Posted at 05:51h, 04 January Reply

    Hello Andrea,
    This featured post plugin is awesome can you tell me how to bring images in the plugin.
    and is their any flashy featured post plugin like this available for wpmu

  • ezhil
    Posted at 05:58h, 04 January Reply

    Hello Andrea,
    This featured post plugin is awesome can you tell me how to bring images in the plugin.
    and is their any flashy featured post plugin like this http://css-tricks.com/examples/FeaturedContentSlider/ available for wpmu

  • `rolandinsh`
    Posted at 12:20h, 07 January Reply

    look like it’s not working with WP MU Resulting blank screen.
    Only by editing wp_ table in phpMyAdmin I got back my admin page.
    Just FYI

  • Nicolas
    Posted at 14:04h, 16 January Reply

    This plugin is fantastic! Thanks for creating it!

    Just one question, how can you limit the length of caracters of the featured posts in the plugin?

    Is that something that can be controlled?

    Thanks in advance!

  • Hammy
    Posted at 23:38h, 12 February Reply

    Hi there,

    Is this plugin working with WPMU

    I had it working with but having upgraded it doesn’t seem to be working. I’m using the Global Tags plugin. I’m getting the feed and can select the articles but nothing is showing up on the main blog.

    The blog is http://motif.swinmc.net


  • Darren
    Posted at 15:54h, 10 March Reply

    I love the idea of this plugin, but I can’t seem to get the list generated on the right-side.

    My error log says “Data too long for column ‘feature_timestamp’ at row 1 for query INSERT INTO wp_featuredposts…(and so on).”

    Just wondered anyone on WPMU 2.9.1 was dealing with.

  • greg
    Posted at 16:20h, 18 March Reply

    So, I gave your plugin a try. In the plugins list it’s listed as version 1.0. It says click here to upgrade automatically, but upgrading it does nothing and leaves it listed as 1.0. (not 2.8.1?)

    I also can’t find any management screen for this plugin. Nothing under appearance, nor settings. If it is supposed to be under appearance, You should seriously reconsider this choice and place a settings screen under settings.

    I found the widget under widgets, and added the widget, but found no options for the widget and it displayed this on my blog:

    Fatal error: Call to undefined function ra_featured_show() in /home/casualvegan/data/www/thecasualvegan.com/wordpress/wp-content/plugins/wordpress-mu-featured-posts/ra-featured-posts-widget.php on line 22

    • Ron
      Posted at 23:02h, 19 March Reply

      Are you using WP or MU?

  • Benjamin Knight
    Posted at 13:18h, 01 April Reply

    Are there any compatibility issues with MU 2.9.2? I installed this plugin, but in the admin area for the plugin, when I enter the feed URI and click “Save Options” I don’t any posts that I can choose to feature, even though the feed is valid and has content.

    • paul
      Posted at 08:11h, 19 April Reply

      same issue… i click “Save Options” and any post.

  • Maryann
    Posted at 09:47h, 12 May Reply

    I’m having the same upgrade issue, can’t get it to upgrade, even manually, and then can’t get the admin menu to show up. Really want to use this. Using wpmu

  • Maryann
    Posted at 10:02h, 12 May Reply

    OH! I just got it to work, reinstalled it. I deactivated a plugin I think was conflicting. Now am getting the blank screen, but will keep working on it (blank screen that is noted above with the admin page) – I’m psyched it’s showing up now though!

  • Maryann
    Posted at 12:31h, 12 May Reply

    I got it working finally! One problem still remains – the avatar – it is entering the blog id of just the tag database – so if there are multiple users, the incorrect avatar shows up. I’m working to correct this. Is there a fix to this in any later version?

    • andrea
      Posted at 14:22h, 12 May Reply

      Nope, no fix. Don’t know what avatar you mean, as they aren’t built in to WordPress itself, unless you mean where it pulls in gravatars.

  • Erik Vlietinck
    Posted at 10:46h, 11 June Reply


    I tried your plug-in, and from the database tables it creates, it looks like it’s working, but the admin page never shows –it’s a blank page (nothing in-between the body HTML tags.

    I’ve tried turning off all plug-ins that I have installed, but to no avail. I am running WPMU 2.9.2.
    Can you please help? I am not a programmer, so I won’t touch your code as I’m sure to mess it up anyway.

    • andrea
      Posted at 15:43h, 11 June Reply

      We’ve just updated the plugin for 3.0 – are you using the latest version?

  • Erik Vlietinck
    Posted at 02:05h, 13 June Reply

    Yes, and it works on a 3.0 RC3 blog but not on the WPMU 292 blog my main site runs on.

  • robin9
    Posted at 06:47h, 26 June Reply

    Not working with wp3.0 After update or upgrade it is still asking to upgrade in the plugin. Tried upload method also the same. Any idea.

    • Ron
      Posted at 20:26h, 26 June Reply

      “Not working with wp3.0” is not much to go on when trying to find an issue with a plugin. In this case, one of the files did not get updated to the new version in the SVN. I’ve fixed that.

  • Denise Barnes
    Posted at 17:59h, 02 August Reply


    will this work with a multi-site WP 3.0 install? and, more to the point, if so, how? i am a complete novice. i’d like to pull posts from 25 blogs to 5 areas on the blogs main blog, having the ability to point to where those posts will land.

    i understand you have a plugin in development for just what i am describing. any idea when it will be available?

    thank you.

    • andrea
      Posted at 18:03h, 02 August Reply

      Yep, this’ll do it.

      • Denise Barnes
        Posted at 18:49h, 02 August Reply

        i have been unable to make it work as i would like, but as i said i am a novice. you don’t have any extended tutorials, do you?

      • Tenley Shewmake
        Posted at 18:23h, 15 December Reply

        I installed this on a wordpress 3.03 multisite and cannot find the Admin page. There is nothing under Appearance or Admin. I then created a mu-plugins directory and put the plugin there, refreshed the dashboard and still nothing. This would be a big help if I can get it to work. Thanks!

        • Ron
          Posted at 18:48h, 15 December Reply

          “In MU, the menu item is under site Admin” – In a WP 3.0 network that’s the super admin menu.

        • Andrea_R
          Posted at 18:58h, 15 December Reply

          Make sure you put the plugin *files* in the mu-plugins folder, and not the folder containing the featured posts & widget files. It won’t be read then.

          you can double-check it’s done right by visiting the Plugins menu. If there’s a “must use” tab showing the files, then they are installed correctly.

          See this post for more details on the mu-plugins folder:

          • Tenley Shewmake
            Posted at 11:20h, 16 December

            Thanks Andrea, putting the files in the folder did the trick!

  • Nathan
    Posted at 06:19h, 23 October Reply

    Is it possible to show the whole post (including images, featured image if there is one) and any embedded video/audio…?

    I’d like to show the posts as if they’re just part of the normal blog – not just an excerpt.


    • andrea
      Posted at 09:12h, 23 October Reply

      Then just use the Sitewide tags plugin.

    • Ron
      Posted at 21:47h, 23 October Reply

      That type of content is usually stripped from the feeds. So, it’s a limitation of feeds and not this plugin.

Post A Comment