MiniPosts

MiniPosts, or Asides are small blog posts that live outside of the usual hierarchy of postings. They are usually displayed differently from normal posts, and are occasionally placed on a different part of the root page of the blog.


A snapshot of the Asides plugin running on Pie Palace.

A bunch of different solutions exist to the “Aside” problem. According to the WordPress site there seems to be two ways of adding asides to your blog. Both involve mucking around with custom tags on every post, or setting up a special category. Morgan Doocy has a very elegant and clean approach that provides a checkbox on the Post page.

I’ve added to Morgan’s plugin, creating a cute little box for the checkbox to live in, an option page pane to edit the appearance of your asides, and a Widget wrapper to give you full floating control of the asides in your sidebars.

Please download the latest version and give it a shot.

Old Versions

Old versions of Miniposts are available below. If you want to install Miniposts 2, I suggest you use the automated installation manager or visit the plugin page on wordpress.org.

0.6.8 (Crazy Connectivity) December 19, 2008
  • Improved appearance of options page
  • Fixed naatan‘s smiley code to run without smilies (tip: Lan)
  • Moved download hosting to wordpress.org
  • Improved handling of the meta field to prevent post duplication
0.6.7 (Boss Bass) December 14, 2008
  • Fixed up appearance in WordPress 2.7.
  • Added naatan‘s smiley code
0.6.6 (Angry Armadillo) March 8, 2008
  • Added global keyword to allow loading on WP 2.5, fixed mini_posts_where() to filter posts from subscription feeds, fixed up meta box for post edit page to look more WP2.5y.
0.6.5 (Flatulent Kitten) July 3, 2007
  • Possible fix for the “missing pages” problem: modified the filters for posts_where and posts_join to be little less complex. Fixes the problem on this blog, so it may help elsewhere.
  • Note: This shouldn’t be considered a full release, as it just fixes a specific bug. If you haven’t experienced the pages disappearing from the admin view, then it probably isn’t worth installing this version.
0.6.4 February 10, 2007
  • Prevent error from occuring when the widget plugin is not installed.
  • Prevent miniposts from losing their minipost status on comment. Due to a change in WordPress.
0.6.3 January 28, 2007
  • Added excerpt/more support
  • Made Asides appear in search results
  • Made Aside title editable
0.6.2 September 24, 2006
  • Fixed bug the included unapproved comments in the comment count of a minipost.
  • Added the %date% format specifier.
0.6.1 June 21, 2006
  • Fixed bug that prevented comment counts from being displayed properly.
0.6.0
  • Original release

Installation Instructions

Please note, before you install MiniPosts2, you must have the Widgets plugin installed.

  1. Download
  2. Copy the zip file to the wp-content/plugins directory of your blog
  3. Unzip miniposts2.zip
  4. Login to your WordPress blog as administrator, and go to the Plugin panel of the dashboard.
  5. Click on the Activate link beside MiniPosts2

The MiniPosts2 plugin should now be activated.

Upgrade Instructions

To upgrade an existing installation of MiniPosts2 to a newer version, follow these steps;

  1. Login to your WordPress blog as administrator, and go to the Plugin panel of the dashboard.
  2. Deactivate the current copy of MiniPosts2.
  3. Delete the file wp-content/plugins/miniposts2.php from your blog.
  4. Download the latest version of MiniPosts2.
  5. Copy the zip file to the wp-content/plugins directory of your blog.
  6. Unzip miniposts2.zip.
  7. Login to your WordPress blog as administrator, and go to the Plugin panel of the dashboard.
  8. Click on the Activate link beside MiniPosts2.

These steps will not modify any existing posts you have flagged as an aside. (Of course, if it does, I’m not responsible)

Controlling the Appearance of the MiniPost List

To control the appearance of your asides list, go to the Options pane of the Admin Interface, and select the MiniPosts tab.

MiniPost appearance is controlled through the Options page. To edit the options,

  1. Go to your blog’s admin dashboard
  2. Click on Options
  3. Click on MiniPosts

The options will look something like:


Screenshot of the options page of MiniPosts2 0.6.3

The options have the following effects:

Show/hide
Filter mini posts from the Loop
Prevents MiniPosts from being displayed on the main page.
Filter mini posts from subscription feeds
Prevents MiniPosts from being shown to anyone viewing with an RSS reader.
Maximum number of miniposts to display
Maximum number of miniposts to display
Limits the number of MiniPosts shown. If this value is set to zero, then all MiniPosts will be shown (which is a bad idea). If this value is set to some other number, at most that number of miniposts will be shown.
Minipost Title
The title to display at the top of the MiniPost widget.
Minipost Format
How each Minipost should appear. The text entered into the box will be shown for every Minipost, with the appropriate values filled in for %title%, %post%, %commentcount%, %date%, and %permalink%. In the current version, the Miniposts are wrapped in the text <div class="miniposts"> and </div>.
More Format
If you use an Optional Excerpt or the <!--more--> keyword in one of your asides, the word %more% will be replaced with the text you supply in this field. You probably want it to be a link to your full post. Note that all of the other keywords (such as %permalink%) can be substituted into this field.
Date Format
A specification of what the date should look like. The date format is a collection of characters that PHP’s date() function understands. The default is Y/n/j, which shows the year, month, and day that the post was saved. If you don’t use the %date% specifier in the Minipost Format, the date will not be displayed, regardless of value.

Creating a MiniPost

Creating a post with the MiniPost2 plugin is pretty much the same as creating a normal post. In order to set a post as being a MiniPost, go to the Write Post page as normal. If you’ve installed MiniPost2 properly, you’ll see a box that looks like:

minipost-0.6-checkbox.png

To set the current post as a Minipost, click the checkbox and Publish. Your posting will appear, either on the front page (if you have left the “Filter Miniposts from the Loop” blank), or in your asides list.

Creating a Teaser

These instructions apply to MiniPosts 0.6.3 and above

Sometimes you don’t want your entire post to appear in the miniposts widget, you’d rather see a short introduction, followed by a “Read More” link that leads your reader to the entire post. As of MiniPosts2 0.6.3, that is supported.

There are two ways of creating a teaser: you can create an excerpt, or you can use the <!--more--> quicktag in the text of your post. Technically, the teaser only refers to the second technique, but we’ll use it as a blanket term to refer to both approaches.

Instead of the full length post appearing in the MiniPosts widget, only the teaser will show up. By default, your teaser will be followed with the text “More…” linked to the full post. You can change the linked text by editing the More Format on the options page.

MiniPosts API

MiniPosts2 provides two functions, is_mini_post(), and get_mini_posts().

is_mini_post()
This function takes no arguments and can only be called from within the Loop. Returns true if the current post is a minipost, and false otherwise.
get_mini_posts($format = null, $limit = null)
This function displays the existing miniposts. If either of the arguments are specified as non-null then the display is changed. The $format variable is used to specify a format, over-riding the values specified on the Options page.

396 Responses to “MiniPosts”

  1. 2007.Jan.02 @ 23:21

    I figured out the first question, but still, my posts are all running together. Why?

  • 2007.Jan.03 @ 07:16

    hi mr e
    i have a little problem with your plugin.
    i did all configirasion but minipost didnot working , i dont know. my wordpress ise ronan 2.05 . when i writing post and i chek to this is a minipost but when i publish my post did not see like a minipost. my post seeing other post.

  • 2007.Jan.05 @ 23:07

    I have an issue, but I don’t know if it is built into your plugin. I am wanting to limit the text (post text) so that only part of each MiniPost is displayed. And then a link (such as the title) can link them to the actual post. Kinda like a teaser. Something that shouldn’t be on the frontpage … but is a part of content, such as tips/tricks, etc.

    Can your application do this?

  • 2007.Jan.06 @ 06:10

    I get the same error as Terrie.
    It seems the options isn’t getting registered properly.

  • 2007.Jan.06 @ 16:11

    I believe my last post was deleted from you guys :-\. I asked a legit question, and I expect some kind of response.

    I am wanting to limit the amount of post information. There are instructions above to limit the amount of posts individually, but not how to limit the ammount of the the post that is displayed.

    I am kinda wanting it to work like WP regular posts are. So, in other words, I want to be able to create a regular post like normal (then checking the minipost option) … making it not viewable in my regular posts (check that option too) … but the only difference is, when i put the (more tag from wordpress) into the post, I want minipost to truncate right there … so that you can click on a link that says “continue reading” (kinda like a teaser) … and read the rest.

    The reason for this is I want like a “tips/tricks” section that is secluded from my regular posts. Please let me know if your program will do this and how; please do not remove my comment again.

    Regards

  • 2007.Jan.06 @ 16:12

    That’s weird, not its showing up; I swear it wasn’t there before – after i cleared the cached and tried two other comptuers and three other web browsers.

    Oh well, if you can just answer the questions that would be cool. Thanks.

  • 2007.Jan.09 @ 01:00

    Howdy all,

    Thanks for your patience. Here is my omnibus response:

    Terry and Koz: The %more% idea sounds pretty swanky. I’ll add it for 0.6.3. Since I don’t get paid for this, I’m not going to make any promises about completion date. I’ll aim for the next few weeks, tho.

    Lolly: Umm, I don’t think there is a way to change the plugin title. If there isn’t, I’ll add that for 0.6.3 as well. It really does seem kinda basic, doesn’t it? =)

    Lolly: Your posts are running together because you don’t have a spacer between each aside. You can do that either by adding a <br/> at the end of the Minipost Format config section, or by editing the style sheet corresponding to your post.

    Thanks for your appreciation! It’s all the payment I get for writing this stuff, so keep it coming. =)

  • 2007.Jan.09 @ 01:02

    Hey Dan Hurley,

    Eww. That sounds like a Javascript problem. Although MiniPosts indirectly uses Javascript, it’s neatly hidden from me with the power of the Widgets plugin. I’m afraid that I can’t help with that. =(

    Try one of the WordPress help forums.

    e

  • 2007.Jan.09 @ 12:23

    Ok. I’m looking forward to seeing this !
    Thanks for your great job, anyway.

  • 2007.Jan.16 @ 00:31

    Thank you so much. I did manage to change the plugin title just by editing the plugin file to say what I wanted it to be. And I got the line breaks, thank you.

    I see above where you told someone how to make the title a clickable link. When I do what you say, it makes it a link, but it links to an unknown page. Any ideas what’s wrong?

    Thank you again! This is great work that you do. I wouldn’t have the first idea where to begin (as is probably obvious!)

  • 2007.Jan.16 @ 00:34

    Nevermind! For some reason I just had to take out the quotation marks around ”%permalink%” and it works now. With the quotes, it was adding all kinds of weird stuff before and after the real address. Weird.

  • 2007.Jan.21 @ 05:59

    I have the same question as Drew Decker. I run a movie website, and I’d like to have a separate “Movie News” section in the sidebar from my movie reviews, which are the main posts. I’d like to know if it’s possible to have a “click here to read the rest” link for the “Movie News” miniposts, which takes you to the full post? Thank you in advance.

  • 2007.Jan.25 @ 14:21

    Any chance of fixing this for wp2.1 (ella)? The admin panel is broken for miniposts. When I click on the miniposts options all I get is a blank page.

  • 2007.Jan.25 @ 14:34

    Hello ! Can you tell us about wordpress 2.1 compatibility ? I won’t upgrade wordpress until I know if your plugin is compatible.

  • 2007.Jan.25 @ 16:51

    I’ve upgraded and it’s compatible with 2.1 – check my site, it’s all fine.

    Although – and I’m not sure if this was happening before I upgraded or not, sorry – it does sometimes ‘forget’ which posts are miniposts. Now and then I post a new minipost and it works fine, and then when I add another new post (a normal post) and when I refresh my site the minipost suddenly appears in the main content column. I go back in, edit the minipost again and it jumps back to the sidebar.

    Anyone else had this?

  • 2007.Jan.27 @ 07:49

    Ok… To those who, like me, could not wait any longer to have the answer : it seems to be ok.

  • 2007.Jan.28 @ 03:54

    Did you forget to update the version number? ;)

  • 2007.Jan.29 @ 00:27

    MiniPosts 0.6.3 is available. It has teaser support, an editable title, and shows asides in the search list. Enjoy!

  • 2007.Jan.29 @ 02:11

    Thank Ya! :D … I appriciate it :) Will take a look after my movie — heh … at about 3AM

    – Drew

  • 2007.Jan.30 @ 21:52

    I just installed the latest version on WP 2.1. The miniposts show up in the sidebar, but all main posts from the default category disappeared. Any idea where the problem might be? Thanks, Marc

  • 2007.Jan.31 @ 22:59

    Gordon sez:

    Always good to see a plugin being continually developed. Many thanks for this.

    As I can’t see previous comments against the older version, can I ask if anyone else has reported that some posts ‘forget’ they have been marked as miniposts?

    This is happening daily on my blog, and there doesn’t seem to be much pattern to it. Sometimes it’s the last minipost, sometimes the one before that, but whatever it is that is causing it, the minipost checkbox is being “unchecked” causing the miniposts to appear in the main post stream.

    ANY ideas (sorry, I know the description is a bit vague).

  • 2007.Jan.31 @ 23:10

    Hi Marc,

    Hmm, I’m not too sure what’s going on. It sounds like the asides plugin might be interacting with one of your other plugins. What is your default category, and what other plugins do you have installed? (I doubt that I’ll have time to check each one of them, but something may jump out)

    Gordon:

    It sounds like you might have the “Filter MiniPosts from the Loop” unchecked. Try checking that and giving it a shot. Please let me know if this works.

    e

  • 2007.Feb.02 @ 09:44

    Hi e,

    I have that option checked.

    AND I know WHY it’s happening now.

    The minipost ‘check’ is being reset whenever someone leaves a comment on that post. Hence the reason it seemed kinda random.

    I can replicate it easily so it’s definitely the reason it’s happening, any ideas?

  • 2007.Feb.03 @ 12:29

    e,

    Is there a way I can filter out Miniposts from the “Recent Entries” Loop on ALL pages? The only place I want people to find them are through the Category link to “Miniposts.”

    The problem arises because I’m using a static About page for my index and the miniposts are appearing in the Recent Entries Loop, directly below the miniposts themselves. I’m experienced enough with this stuff, that if you give me a basic idea of what to do, I should be able to handle it.

    Thx,

    Matt

  • 2007.Feb.03 @ 13:35

    Hi Matt,

    That’s a good question. I’m not entirely sure how the Recent Entries are acquired, but I’m guessing it’s by running query_posts(). I’m not overly familiar with that function, but I’m guessing that you could probably loop over each post (in the past n days), and call is_mini_post() on it. If it’s an aside, it can be ignored, otherwise it should be displayed.

    I hope that helps.

    If you want to use is_mini_post() outside of the loop, feel free to modify it and send me the source. The check is pretty simple, so it should be trivial to modify. I’ll include it in MiniPosts 0.6.4.

    e

  • 2007.Feb.05 @ 18:18

    So, any reason why miniposts ‘lose’ their setting when someone comments on one?

    There is nothing else I’ve changed, but I guess as no-one else is experiencing it, it’s my setup, but I’m stumped.

  • 2007.Feb.06 @ 00:29

    The minipost “loses” its setting when it’s commented upon? It sounds like your theme is being overzealous when it gathers posts to display in The Loop. Although I could be wrong.

  • 2007.Feb.06 @ 00:50

    And I am most certainly wrong. Commenting on a minipost causes it to lose its metadata, which is definitely a bug. The _mini_post flag gets wiped out of the DB, which is kind of weird.

    Of the top of my head, I’m not entirely sure what could cause this. Since I don’t have a debugger for PHP, I can see how trying to figure this out is going to be painful++.

    Until I’ve fixed 0.6.3, and released 0.6.4 (the bugfix version) please use 0.6.2.

    Sorry!

  • 2007.Feb.06 @ 05:16

    No probs, I’ll roll back to 0.6.2.

    Would having my code help you troubleshoot this? If I can do anything to help, drop me a line.

  • 2007.Feb.07 @ 13:13

    You dit it !!!! I just came to see if youhad developed the “more” setting after a commenter on my blog told me I should show only part of the miniposts and…

    Thank you very much !!

  • 2007.Feb.07 @ 16:40

    Hello! This plugin looks great, but i’m having some trouble to make it work…

    I’m using WP 2.1 with default theme, I’ve installed the Widgets and Miniposts plugins. I can flag miniposts, but they dont show on my sidebar (they show up on main page if I uncheck the Loop on options)… What am I doing wrong? I know it must be something stupid, but I’ve searched everywhere…

    Thanks

  • 2007.Feb.08 @ 17:19

    OK, I know it’s only been a couple of days..

    Do you know, roughly, when 0.6.4 will be available? One week? three? No idea?

    Just asking, not hassling!!

    Ohh and rolled back to 0.6.2 and get the same behaviour I’m afraid.

  • 2007.Feb.09 @ 00:13

    Hey Gordon,

    0.6.4 probably won’t be out for a couple of weeks. I try to spend as little (non-work) time in front of a computer as possible. But something will be coming soon.

    I have a sneaking suspicion that the loss of the metadata is going to be a problem with WordPress, not MiniPosts. I’ve been using MiniPosts 0.6.2 for about four months, and I haven’t noticed the loss of the metadata flag.

    If you’re interested in helping with the debug: stick a print at the start of every function in the MiniPosts code, create a fresh minipost, and then comment on it. You should only see output from the generic setup functions. AFAIK, no Minipost code should run when a comment is posted.

    e

  • 2007.Feb.09 @ 10:34

    This excellent, precisely what I have been looking for in terms of having selected posts appear in sidebar widget. This in fact should be a standard part of WordPress Installation (although there are a number of plugins which should!)

    One development idea — having multiple minipost tags, so that one can have multiple minipost widgets element, with different types of posts. One can also use categories for this, but the ability edit the flags within minipost is a hell of a lot easier than going back and creating a whole new category, and then flagging each post anew.

  • 2007.Feb.09 @ 10:36

    Another idea is to have the ability to turn off the same posts from displaying in the Recent Post widget, or at least have a minipost recent posts widget that does this installed within the plugin.

  • 2007.Feb.11 @ 23:37

    Hey cethirien,

    Yeah, MiniPosts really should support multiple minipost widgets (which is essentially what you’re suggesting with tags). But I don’t need that feature, so I’m unlikely to add it.

    Also: MiniPosts will be hidden from the “Recent Posts” widget if they’re excluded from the loop (the first option on the configuration page). It depends on the “Recent Posts” widget that you’re talking about, however, as the list of recent posts in the Tarski theme doesn’t use the standard widget and includes the miniposts unnecessarily.

  • 2007.Feb.13 @ 06:06

    Hi e,

    I applaud your decision to spend as little time in front of the PC as possible, I wish I could do the same!

    I’m not exactly sure what you mean when you say “stick a print at the start of every function in the MiniPosts code” but I’ll do some digging and see if I can figure it out.

    I agree, it’s more likely to be a problem with WordPress, as no-one else seems to have reported it.

    I’ll head over to the WordPress support forums and ask there.

  • 2007.Feb.14 @ 12:47

    Hi!

    Great plugin – works like a charm. One question, though… is it possible to display the author’s name within the minipost format? I’m using it on a multiple-author blog, and it gets slightly confusing. Thanks in advance!

  • 2007.Feb.15 @ 23:22

    Gordon:

    It’s fixed! Download 0.6.4 and give it a whirl!

    Jonathan:

    There are no hooks to add the author’s name to miniposts. I’ll add that as a requirement for 0.6.5, but don’t hold your breath. I’ve already wasted too much time on this plugin.

  • 2007.Feb.17 @ 15:58

    ERK!! Horrible error messages…

    WordPress database error: [Server shutdown in progress]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_postmeta AS miniposts_meta ON (wp_posts.ID = miniposts_meta.post_id) WHERE 1=1 AND ID NOT IN (5397, 5398, 5399, 5400, 5402, 5405, 5406, 5408, 5410, 5411, 5412, 5413, 5414, 5416, 5417, 5420, 5421, 5422, 5423, 5426, 5428, 5429, 5431, 5432, 5434, 5435, 5436, 5437, 5440, 5441, 5444, 5445, 5448, 5451, 5456, 5458, 5459, 5461, 5462, 5464, 5465, 5466, 5471, 5473, 5474, 5475, 5477, 5480, 5481, 5483, 5485, 5487, 5488) AND (post_type = ‘post’ AND (post_status = ‘publish’ OR post_status = ‘private’)) AND (miniposts_meta.meta_key = ‘_mini_post’ AND miniposts_meta.meta_value = 0) GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 4

    WordPress database error: [Lost connection to MySQL server during query]
    SELECT FOUND_ROWS()

  • 2007.Feb.17 @ 18:20

    ACK

    I’m an idiot. Apologies. My ISP was having hassles and I lost the connection to the DB. Ignore (or delete!) my comment, and thanks for the quick release!!

  • 2007.Feb.18 @ 05:21

    Hmm that might not be the only problem.

    http://wordpress.org/support/topic/104214?replies=5

    I was getting this, until I disable your plugin. So there is still something wrong somewhere.. sorry.

  • 2007.Feb.22 @ 23:54

    Is there a way to provide a feed for JUST the mini posts?

  • 2007.Feb.24 @ 23:52

    Hey Josh,

    Nope. But if you want to want to add the support, I’d be happy to patch the plugin. =)

    e

  • 2007.Feb.28 @ 10:17

    Hi e !

    Thank you for your reactiveness (if the word exists). I lasted a while, due to other pbs, to install the new version of wordpress, experienced the bug of the miniposts loosing their status when commented, came here “à tout hasard” and the bug is already handled over !

    Great job !

  • 2007.Feb.28 @ 10:58

    MiniPosts is a great plugin and I have been using it for a couple of weeks now. It works much better than the other similar asides plugins.

    I would also like to mention the issue that Gordon mentioned, where duplicated posts are shown when the site is searched. I disabled your plugin and everything was fine.

    I hope you will fix this in the next release, or give us a workaround.

    Keep up the good work e!

  • 2007.Feb.28 @ 23:33

    Howdy k&b:

    Thanks for the respect. I’ll see if I can get this nasty little bug fixed up, but I can’t promise a timeframe for the fix. All I can say is “soon”.

    For any of you on the lazyweb: the problem is probably due to the SQL the plugin inserts into WordPress’ where statements. Feel free to solve and send me a patch.

    e

  • 2007.Mar.01 @ 04:14

    @ Josh P – if you are using separate categories for your miniposts, just use the builtin category feed that WordPress offers.

    Depending on your site it’ll be something like:
    http://www.YOURSITE.com/category/feed/

    Simple.

  • 2007.Mar.01 @ 11:04

    When I go into options and try to save any changes I get the following error message (mysite is noted below in place of my web site directory). Has anyone seen this type of error on installation. I am using WordPress v2.1. Appreciate any help.

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/wp-content/plugins/miniposts2.php on line 111

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/wp-content/plugins/miniposts2.php on line 111

    Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/miniposts2.php:111) in /home/mysite/public_html/wp-content/plugins/miniposts2.php on line 114

  • 2007.Mar.01 @ 23:24

    Thanks for answering that Gordon.

  • Reply

    You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    If your website is claim enabled, it will be notified that you have posted here.