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.Mar.02 @ 11:10

    No problem e, I’m just hanging back and waiting for the next release.. from what I can see your plugin is my best option. No pressure! ;-)

  • 2007.Mar.02 @ 11:21

    P.S. Your “Recent Articles” list below this comments box is a bit… borked.. different titles, same posts?

  • 2007.Mar.04 @ 14:38

    It would be great if an option exists where we could “wrap” the minipost entries with a ul and a /ul and corresponding li’s for each entry.

  • 2007.Mar.06 @ 19:11

    Josh: You can achieve the same thing with CSS. Set the div that wraps each entry to have a bullet in front of it.

  • 2007.Mar.08 @ 14:01

    Hi there,

    Ever since I upgraded to 2.1, my pages won’t show (backend as well as frontend). Now I’m on 2.1.2, but still no pages. I’ve just discovered today that everything is fine when Miniposts 0.6.4 is disabled. Does this mean 0.6.4 is not yet compatible with WordPress 2.1.2? For this subject, http://www.transycan.net/blogtest/2007/01/23/how-pages-are-different-in-wp-21/ is an important one I think.

    Would be great if you guys could help me out.

    Cheers.

  • 2007.Mar.11 @ 18:21

    I have the same Problem on one of my blogs.

  • 2007.Mar.13 @ 12:14

    Hi,

    in change log the latest version is 0.6.4, but download links to file miniposts2-063.zip

  • 2007.Mar.13 @ 18:21

    I was having a similar problem because the box “Filter Posts from Loop” was checked and also filtering out the most recent pages (but not the ones created before the MiniPosts).

    If the reason for checking the box is to exclude Miniposts from showing on your main post page, another plugin called Ultimate Category Excluder (http://www.fidgeting.net/wordpress-plugins/ultimate-category-excluder/) can be used by excluding the category you post your MiniPosts to. It adds another plug-in to the program but seemed to work for me.

  • 2007.Mar.13 @ 23:27

    As part of the previous post, there appears to be a potential bug where some pages can be picked up as MiniPosts. Perhaps that is something to be looked at for the next version of the plugin.

  • 2007.Mar.20 @ 22:14

    Great plugin… I was having the problem Gordon was having with a comment unchecking “MiniPost” from a post… I realized that I had a really old version of MiniPosts (0.5.2) so I upgraded.

    But now I can’t seem to figure out how to have my comment count say the word Comments after it?

    Before in the get_miniposts() there was a place to list what to say for zero_comments, one_comment, and more_comments… but now thi seems to be gone as the old arguments no longer do anything and it’s not listed in options…

    I figured I would settle for just adding the word “Comments” into the “MiniPost format” in options but that doesn’t help because the comments link only wraps around the number.

    How do I get it to say Comments (and Comment for one 1 comments) in my miniposts? Has the feature been disabled?

  • 2007.Mar.21 @ 14:53

    Hello e,

    Is there any news on the possible fix for the WordPress 2.1 issue where search results are doubled when asides is activated? I understand this is a freeware project of yours, but I really adore your MiniPosts plugin (works much better than the three other alternatives I heavily tested) and would gladly even donate some EUR to you for your work. I presume there are more users that would do it also.

    I am not so profficient in PHP, so has anyone of you (users) found a workaround for this issue?

    Thanks in advance and keep up the great work e!

  • 2007.Mar.26 @ 20:35

    I’ve seen the question a couple of times, but no answer (unless I missed it). Is there any way to use this without using Widgets? Some code I can paste into my sidebar.php or something? I’d rather not use widgets, but the other sideblog plugin doesn’t allow for multiple categories. Don’t think it has teaser support either. I love your plugin, and I’ll probably just use widgets if I have to, but if there’s a simple way not to, I’d sure appreciate it!

  • 2007.Mar.29 @ 13:06

    lolly: You don’t need to use widgets. Check the section titled MiniPosts API (just above the comments). It provides everything you need to display miniposts without the Widgets plugin.

    Jesse: I’ll try to answer/fix that one later.

    All others: I’ll try to get to you when I’m officially off hiatus. =)

  • 2007.Mar.30 @ 12:39

    Excellent plugin, this should almost be a standard feature!

    Good catch by lolly on the quotation marks around %permalink%, that was giving me a big headache.

    e, enjoy!

  • 2007.Mar.31 @ 15:16

    Hi

    I use wordpress 2.1.2 and can’t see the miniposts in the options panel.
    I see the tab label but if i click on it i just see the site i’m making and no options panel.
    I read here that some other people have the same problem but did not see an answer yet, what i can do about it? I would like to use this widget!

    (browser firefox os X)

  • 2007.Apr.01 @ 06:40

    Ha I found it!
    You have to install the miniposts2.php in your plugins/ dir and NOT in your /plugins/widgets/ dir.

    The plug works very nice! Thanks a lot for the good work.

  • 2007.Apr.03 @ 02:11

    Hmm, that may be if I knew what I was doing, but I don’t, exactly. I tried copying and pasting those two lines into my sidebar.php but it just shows those lines on my sidebar, and no miniposts.

    Is there a more descriptive explanation somewhere? Am I missing something simple? Or do I have to understand php to do this?

  • 2007.Apr.03 @ 02:18

    Whoops, sorry, I questioned too soon. I’m pretty sure I’ve figured it out. I just had to add the php stuff, so all I have in my sidebar.php under my miniposts heading is this line:

    And it appears to be working. Is that it then? I don’t need that other line that is mentioned in the API section?

  • 2007.Apr.03 @ 14:20

    Download latest version link in page is incorrect … still linking to 0.6.3 ;)

  • 2007.Apr.04 @ 21:33

    Whups. I’ve updated the default download link to point to 0.6.4. Thanks for the poke.

  • 2007.Apr.04 @ 22:10

    Howdy all,

    I’m trying to reproduce the WP 2.1.3 error where MiniPosts prevents pages from displaying. It doesn’t seem to be happening on my test install (which is using Tarski as a theme). For those who are having problems, which theme are you using?

    e

  • 2007.Apr.04 @ 22:18

    Berislav:

    Are you using the most recent version of MiniPosts? That problem was fixed in 0.6.3. I think. =)

    e

  • 2007.Apr.05 @ 17:48

    Hi,

    I’ve been using MiniPosts for 2 days now (see my previous comment) and already have done some changes in the code. Maybe you’re interested in backporting them to your code.

    The changes can be seen over at http://www.bram.us/2007/04/05/my-distractions-the-almighty-elsewhere-archive-update/

    wbr,
    Bram.

  • 2007.Apr.08 @ 13:04

    Hi e:

    I am using 0.6.4 version and the problem is still there. When searching, all the items (even those that are not labebeled as mini posts) are shown for a couple of times (looks like the number of categories the item is=the quantity of repeats it will get).

    Hope this will get fixed soon :)

  • 2007.Apr.10 @ 14:52

    1) refer to comment March 13, 2007 regarding ultimate category excluder
    note: this does not work as “mini-posts” are not visible in category list and therefore can’t be excluded. the reason as stated is when you hide mini-post from loop so entries are not visible on main posts, you also lose the ability to search by tags which is very helpful.
    2) April 8, 2007 regarding double items in search. yep, when mini is hidden we get double entries on any search. it has to be noted that when you hide from main post, then hit a tag from a mini-post you in fact get the title of the mini-post but an error saying you are searching for something that does not exist. the search window is also retrieved and when you search you get the double entry.

    I am using WP v2.1 and MP 0.6.3

    Thanks, great plug!

  • 2007.Apr.11 @ 08:35

    Berislav & Mr. Chicago (I mean you, Ron):

    Thanks for the tip about number of categories and repeats. I don’t usually categorize my Miniposts, so couldn’t reproduce it. I’ll see if I can reproduce that bug and add a fix in Miniposts 0.6.5.

    Bramus:

    I like your Minipost archive. I’ll see about ripping the function and including it in 0.6.5. Thanks for the code contribution.

    e

  • 2007.Apr.11 @ 15:34

    I’ve installed Miniposts 0.6.4 but when I click on Options -> Miniposts all I have is a blank page.
    The plugin is installed correctly under plugins directory and activated.

    I’ve tried to deactivate all plugins except Miniposts but nothing changes.

    WP version 2.0.10.

  • 2007.Apr.11 @ 23:30

    Osmosis: Do you have the widget plugin installed?

  • 2007.Apr.12 @ 03:46

    Yes, I do. Version 1.0.20060711, a theme widget-enabled and all widgets work correctly.

  • 2007.Apr.12 @ 11:06

    Hi e:

    “Thanks for the tip about number of categories and repeats. I don’t usually categorize my Miniposts, so couldn’t reproduce it. I’ll see if I can reproduce that bug and add a fix in Miniposts 0.6.5.”

    I also don’t categorize my Miniposts, but the search results show duplicated normal (those not categorized as Mini) posts that have a couple of categories. This is surely caused in some way by Miniposts, as when i deactivate a plugin everything works just fine.

  • 2007.Apr.13 @ 18:52

    hello e

    while 0.6.5 is in the oven i would like to tweak my mini-post layout. right now, all entries run into each other, no entry spacing what so ever. where might i move this info around so it lists out nicely like bramus? i am using sidebar widgets but that shouldn’t be a problem i don’t think.

    btw – not that the word “asides” does not fill the bill but bramus “elsewhere” “distractions” also got me to thinking – so that is another project.

    thanks again.

  • 2007.Apr.16 @ 21:31

    The plugin was easy to install, but when I searched for a keyword, I saw duplicate posts. When I deactivated the miniposts plugin, it cured the duplicate posts in search returns problem.

  • 2007.Apr.19 @ 07:33

    @ronchicago – you can edit the formatting of what is displayed in the “Minipost Format” box (scroll back up to the screenshot). Simplest way would be to add some line break tags at the end before the /div.

    HTH

    How is dev of the next version going? I don’t mind testing it for you when you get to that point, drop me a line if I can help.

  • 2007.Apr.19 @ 07:41

    gordon, thanks for the tip = looks great!

  • 2007.Apr.19 @ 21:33

    @ronchicogo: The best way to control the look of MP is to edit the style sheet that your site uses. The minipost plugin wraps all of the posts in a <div>, with each entry being surrounded in their own div.

    @ Gordon: It depends when l get my Fon router working. :(

  • 2007.Apr.21 @ 06:18

    @e – bummer! Well offer stands, whenever you want.

  • 2007.Apr.23 @ 05:25

    Okay, I’ve got the miniposts displayed without using Widgets, but now it’s causing errors on my page, so it doesn’t validate. 3 errors per minipost, and i don’t know what they mean or how to fix them; they’re described here: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Flollymom.com%2F

    This is the way I have the code in my sidebar.php. Is something wrong with it?

    `
    `

  • 2007.Apr.23 @ 05:26

    Gah, how do I paste code?? I’ll try something else:
    `
    `

  • 2007.Apr.23 @ 05:33

    I’m so sorry to clog up your comments section with my idiocy! I don’t know how to paste the code…I’ll try one more time, and if it doesn’t work, will someone just tell me what is the correct way to enter the “is mini_post()” and “get_mini_posts($format = null, $limit = null) into my sidebar.php?

    Right now, I have them both together, surrounded by ‘s and I put after each. Like this: (if it works. This time I’ll try it without the backtics.)

  • 2007.Apr.23 @ 05:54

    Alright, last one, I swear, until you get a chance to respond to me! I figured out that it’s not a problem with the way I’m implementing the code (although that still could be wrong, as it doesn’t seem to matter whether I put the first line of code–the is mini post– in or not) because I tried using it with Widgets and I’m still getting the errors.

    Is anyone else getting these errors? Could it be that this plugin is not compatible with my theme? Is there something I can change in the code to fix it?

  • 2007.Apr.24 @ 06:30

    Um I’m not using widgets (because I’m Obsessive compulsive about the way my stuff is formatted) but anyways when I placed the code in and I limit it to three post to show… it shows three posts but all of them are the same

  • 2007.Apr.29 @ 03:42

    Hi, it may be this theme, am using “WP Themepark/Hemingway/Blue”theme…For some reason (it has a sidebar that is actually a horizonal area about half of the bottom of the main content page. I installed the automatic widget (this theme is one of the new description “widget ready” where there is no drag-drop sidebar widgets, only assumption users know php and can instert code – which i remain fledgling at doing, and in fact, read LOLLI’s post and saw there was no response, she was questioning the API is/get code but I think you say the options page should be enough to use the asides?. I am having no luck (global translation also doesn’t show up right and have never had a problem with that, so thought I could try that code in an aside, but the asides does not work…not on any pages, with/without tags. Can you suggest what could be wrong? I just upgraded to wp 2.1.3. thanks.CF

  • 2007.May.06 @ 18:04

    Regarding the problem of losing ‘pages’ after installing Miniposts (0.6.4). I can confirm that after installation any new pages I create do not appear to show up in the ‘Manage > Pages’ admin panel. I first noticed it with sub-pages not showing but it looks like it is ANY new page created. This ONLY happens if I tick the option to Filter mini posts from the Loop.

    I can display the new page on my site by calling it’s url OK but not see it in Admin. A most preculiar problem. Now it gets worse. I seem to be OK using the standard and current WP2.1.3 but if I use the latest 2.2 pre-release build I get the problem. And I assume that 2.2 will not be that long in being released.

    Otherwise a neat little plugin for which I thank you.

  • 2007.May.06 @ 18:31

    Follow up: I’m wrong. It DOES have the same problem in the current 2.1.3

    I’m not sure why (as I haven’t trawled your code) but this looks like it is caused by the fact that when I create a new page you are NOT creating a post_meta entry for it whereas all pages created prior to activating MiniPost DO have a post_meta entry. I assume this means that somewhere you have added a join to post_meta and thus new pages are getting excluded from the Manage > Pages admin query.

    Just a thought…

  • 2007.May.08 @ 08:45

    My miniposts2 are getting a rather odd link at botton… that points to the comments. I did try reinstalling the plug; but it still seems a little strange.
    ant ideas?

    http://www.hollisbible.org/wordpress

    Hollis Express Update
    This is probably one of the final updates about the “Hollis Express”… %permalink (0)

  • 2007.May.18 @ 10:18

    Hi !

    Do U have any info for us on wordpress 2.2 and Miniposts compatibility ?

  • 2007.May.20 @ 12:58

    Are there any news regarding a fix for the “Missing Pages” problem? I’m experiencing that as well. Is there an update imminent?

    Otherwise, thanks for this plugin — it’s great.

  • 2007.May.22 @ 18:23

    Great work with the plugin. I’ve also encountered a bug that’s been mentioned – the duplicate search results. Just wondering if anybody has found a way to work around it. Much appreciated.

  • 2007.May.22 @ 23:16

    @hthth: Try replacing the mini_posts_where() function with:

    function mini_posts_where($text) {
    
            if (is_home() && get_settings('filter_mini_posts_from_loop')) {
                $text .= " AND (miniposts_meta.meta_key = '_mini_post' AND miniposts_meta.meta_value = 0)";
            }
    
            return $text;
        }

    I’ve made that change locally, but I haven’t had a chance to give it a decent test.

  • 2007.May.22 @ 23:24

    @Teddy (and all others who have encountered the search issue): I haven’t been able to replicate the search problem. If one of you can give me a concrete scenario that causes the breakage, I can probably fix it fairly quickly (ie, within a week).

    Ideally the scenario would start from a fresh wordpress install, would involve a minimum of other plugins, and would include exact categories and text to employ in the post. Something like:
    1. Install WP 2.1.2
    2. Install the blargh theme.
    3. Install MiniPosts 0.6.4.
    4. Create category foo, bar.
    5. Create a post titled “toto”, containing “baz”, members of category foo and bar. Save the post.

    Given the above scenario, using the Tarski theme, I have been unable to reproduce the error. Searching for the word “the” on this blog does not produce multiple hits for individual miniposts (although it does produce a multiple hits for an ordinary post).

  • 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.