MiniPosts Help
Writing/Editing
When writing or editing a post, a checkbox is displayed below the Post textarea for flagging the post as a mini post.
Options Page
(Under Options → MiniPosts)
Mini Post Options
- Filter mini posts from the Loop
- Removes all posts tagged as mini posts from the front page of your blog. They will still be present on archive pages and viewable from their permalinks.
- Filter mini posts from subscription feeds
- Removes all posts tagged as mini posts from your RSS & Atom feeds.
- Suppress auto-paragraphing on mini posts in the Loop
- Prevents WordPress from using its auto-paragraphing feature on mini posts outside of
get_mini_posts().
Mini Post Manager
Displays a list of all posts, with a MiniPost column containing a checkbox for each post’s mini flag. A quick way to mark multiple posts.
Functions
is_mini_post()- When called from within the Loop, returns
trueif the current post is a mini post. Use this function in your templates and themes to handle mini posts differently than normal posts. get_mini_posts(format, permalink_text, zero_comments, one_comment, more_comments, limit)-
Displays limit number of the most recent mini posts, formatted according to format, permalink_text, zero_comments, one_comment, and more_comments, inside HTML list elements.
(WARNING: The argument sequence of get_mini_posts() changed in version 0.5.)- format
- A string containing any of
%post%,%permalink%, or%commentcount%to denote placement of these elements. Default:"%post% %commentcount% %permalink%" - permalink_text
- The text used for the permalink. Default:
"#" - zero_comments, one_comment, more_comments
- The format in which comment counts will be presented, using
%sto denote the number of comments where needed. If only the first (zero_comments) is specified, that format will be used for all three. Default:"(%s)" - limit
- Maximum number of mini posts to retrieve.
Examples
Following is a sample index.php file illustrating how to intersperse mini posts with normal posts on your blog home page. (Note: be sure to uncheck “Filter mini posts from the Loop” in Options for this to work.)
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (is_mini_post()) : ?>
<div class="minipost">
<p><?php the_content() ?> <?php comments_popup_link('(0)', '(1)', '(%)'); ?></p> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">#</a>
</div>
<?php else : ?>
<div class="post">
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!– by <?php the_author() ?> –></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
<!–
<?php trackback_rdf(); ?>
–>
</div>
<?php endif; ?>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
<div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
This produces mini posts that look like this, interspersed with normal entries:
get_mini_posts()
Produces:
- This is a mini post. (1) #
- This is another mini post. (0) #
- This is yet another mini post. (7) #
- This is still one more mini post. (2) #
get_mini_posts("%permalink% …%post% — %commentcount%", "¶", "no comments", "one comment", "%s comments", 3)
Produces:
- ¶ …This is a mini post. — one comment
- ¶ …This is another mini post. — no comments
- ¶ …This is yet another mini post. — 7 comments
(Notice how the 3 in the last argument of the function call limited the number of mini posts to three.)
March 3rd, 2005 at 1:28 pm
Thank you for the plugin (and this help page)! Just one thing: the example code contains smart quotes, apparently (in the minipost code itself, both single and double quotes), and so directly cutting-and-pasting results in a parse error. So’s you know.
March 13th, 2005 at 5:23 pm
This plugin and Jerome’s Keywords (http://vapourtrails.ca/wp-keywords) seem to have a conflict.
March 13th, 2005 at 6:16 pm
I’ll look into it Mark. Thanks for letting me know.
March 13th, 2005 at 11:38 pm
Morgan, it looks like both of our plugins modify the posts join & where clauses. I’m not sure if there’s an elegant way around this…
March 14th, 2005 at 12:05 am
Hmm… I’ll see if I can come up with a creative solution.
March 15th, 2005 at 1:30 am
This is exactly what I’ve been looking for…except I can’t seem to get rid of parse errors.
Just wondering how you include these miniposts in your sidebar. Does it need to be inside the loop? Can you show me what your sidebar code looks like?
March 15th, 2005 at 1:50 am
beej — did you make sure you don’t have whitespace at the beginning or end of the file? That’s what usually creates parse errors when people copy & paste the plugin from wp-plugins.org.
Putting the posts in your sidebar is easy: just mark posts as “mini”, add get_mini_posts() to your sidebar, and you’re done. See above for more customization options.
March 29th, 2005 at 8:52 pm
For some reason the plugin, is attaching a footer to my posts, how do I remove that?
March 30th, 2005 at 6:18 am
Gary: Could you be more specific? What exactly is happening, how is it different from what you would expect to happen, and can you provide a link to an example?
March 30th, 2005 at 6:31 am
Sure, go to my site right now I just posted a mini post for testing
March 30th, 2005 at 6:32 am
Never mind, I think I found it regardlesss, sorry
April 15th, 2005 at 4:35 am
Would there be an easy way to get this displayed as a list in my sidebar?
Tidepool
April 15th, 2005 at 5:09 am
I just realized I never replied here. Everything works perfectly. Is there a way to show all the archived miniposts? Just wondering. Thanks for this great plugin!
April 21st, 2005 at 8:07 pm
I’ve got this error when change a normal post to mini-post, please help
Warning: Cannot modify header information - headers already sent by (output started at xxx/blog/wp-admin/admin-header.php:8) in xxx/blog/wp-content/plugins/mini-posts.php on line 62
April 24th, 2005 at 11:00 pm
This looks to be the perfect plugin for what I want but I’m getting an error:
Parse error: parse error, unexpected T_STRING in /my/path/here/wp-content/themes/default/index.php on line 12
That’s with the example above being cut-n-pasted on WP 1.5, any idea what I can do to get it working?
April 25th, 2005 at 7:02 pm
Morgan,
Just as an update, you can change the way your SQL JOIN is written to prevent conflicts with other plugins that use postmeta data. Instead of doing a join on the table directly, give it an alias and then have all your other query mods use this alias. In this way you can do multiple joins on the same table without having the WHERE clauses conflict.
I’ve changed my keywords plugin to use:
... LEFT JOIN wp_postmeta AS jkeywords_meta ON (wp_posts.ID = jkeywords_meta.post_id) WHERE ... AND jkeywords_meta.meta_key = 'keywords' AND jkeywords_meta.meta_value LIKE '%plugin%' ...April 27th, 2005 at 11:42 pm
It seems that from time to time my options/miniPosts/Filter mini posts from the Loop checkbox is checked whereas I unchecked it myself.
I don’t understand what actually triggers this. It does not seem to be related to the posting of article. It’s just every two or three days, mini-posts suddenly disappear, and I know that the option has been mysteriously checked then.
Would you have an idea ?
(By the way, thanks very much for the plugin, this is a great piece of code, especially for a neophyte like me !)
April 30th, 2005 at 5:19 am
Great plugin! I would like to set my static WP about page as a minipost in my sidebar. Considering the plugin is called ‘minipost’ and not ‘minipage’ it stands to reason that there’s no option for minipost on a WP static page. Is there a way around this? Or perhaps an alternate method to show a blurb from my about page in my sidebar? Thanks in advance for any help you may be able to provide.
May 4th, 2005 at 9:24 pm
Very cool… Up and running on my site!
May 23rd, 2005 at 9:42 pm
Had them in a list.. and then went and upgraded without backing up what I really wanted to keep… can anyone help me out again?
May 26th, 2005 at 3:43 pm
After figgering out I couldn’t just screen-scrape the code (click text-only code at the bottom), the plug installed, checked the options, checked ‘minipost’ box for authoring, and published, no errors…but it just shows up on blog-front like any post. How do I put a minipost in the sidebar without a stated function call to place there? And in the larger sense, besides possibly placing posts elsewhere than blog-front, what does mini-blog do that regular posting doesn’t? Or is that basically it?
Cheers!
May 26th, 2005 at 3:46 pm
Apologies! Just now read the function call, above, that allows the Loop to distinguish mini-posts from regular posts. Was that in the code instructions? Musta missed that somehow….
Cheers!
May 26th, 2005 at 10:32 pm
I can’t seem to run the above code from a screen-scrape. Any other place to get it?
Cheers!
May 26th, 2005 at 10:43 pm
Nevermind. Got it by using different curly quotes. Yay!
May 31st, 2005 at 4:56 pm
very cool plugin. up and running on my site too.
one question. always that one nagging question. is there a way to suppress the mini-posts from showing up in my “recent posts” side bar item?
June 5th, 2005 at 11:30 pm
How do i display the last 10 miniposts ? the default code displays all miniposts … thanks for your help and this really great plugin
Carlo
June 25th, 2005 at 10:45 pm
Was fansipan’s error ever answered? I’m getting the same thing now, whenever I try to log directly onto my wp-admin page. I can access it indirectly though an edit feature, but that’s it.
Warning: Cannot modify header information - headers already sent by (output started at /home/a-new-cr/public_html/wp-content/plugins/mini-posts.php:348) in /home/a-new-cr/public_html/wp-includes/pluggable-functions.php on line 109
Warning: Cannot modify header information - headers already sent by (output started at /home/a-new-cr/public_html/wp-content/plugins/mini-posts.php:348) in /home/a-new-cr/public_html/wp-includes/pluggable-functions.php on line 110
Warning: Cannot modify header information - headers already sent by (output started at /home/a-new-cr/public_html/wp-content/plugins/mini-posts.php:348) in /home/a-new-cr/public_html/wp-includes/pluggable-functions.php on line 111
Warning: Cannot modify header information - headers already sent by (output started at /home/a-new-cr/public_html/wp-content/plugins/mini-posts.php:348) in /home/a-new-cr/public_html/wp-includes/pluggable-functions.php on line 112
Warning: Cannot modify header information - headers already sent by (output started at /home/a-new-cr/public_html/wp-content/plugins/mini-posts.php:348) in /home/a-new-cr/public_html/wp-includes/pluggable-functions.php on line 114
July 6th, 2005 at 6:00 am
When I am trying to tick off posts to make them miniposts, i have the same problem as fansipan above:
Cannot modify header information - headers already sent by (output started at /var/www/hongpong.com/wordpress/wp-admin/admin-header.php:8) in /var/www/hongpong.com/wordpress/wp-content/plugins/mini-posts.php on line 62
This would seem to pertain to line 62’s
header(”Location: admin.php?page=mini-posts.php&updated=true”);
So apparently the admin page is already getting rendered as it tries to modify the update-destination URL. I don’t know where this would be set. A quick & dirty fix: comment out line 62, and it will save your changes, but not return you to the admin page.
July 22nd, 2005 at 10:25 am
@fansipan:
You most probably have blank lines at the top and/or bottom of your mini-posts.php file. Delete these, make sure not even an extra blank is there after the last ?> in the last line.
July 25th, 2005 at 8:13 am
Hi Morgan,
thanks a lot for your great plugin. I hacked it a little to get clickable, full text headers and tags around the content part of the posts. So now I can style content, links and headers differently. I also added background-color alteration. See an example at my website. These were all very minor additions to your code; if you are interested I can nevertheless mail them to you.
I do however have one question: The plugin seems to ignore my Markdown or Textile plugins. How can I teach it to use these?
Best regards,
Christoph
August 3rd, 2005 at 12:43 am
Strange, I dropped the plug in in my WP 1.5.1.3 but it’s not showing up in my plugins page. Any ideas?
September 4th, 2005 at 6:27 pm
Well, I’m confused and can’t get this to work.
What code do we have to add to our index page to get the Mini Posts to show up? I have the plugin activated and it seems to be working fine. I’ve looked at the example index and saw that the main difference was the If block that controls the Mini Posts code. So I cut and pasted that(with corrections for the quotes and such of course), but it only generated an error.
I’ve tried just placing the get_mini_posts function, but then it just results in the function being displayed as text rather then actually being called.
So I’m basically lost.
Can anyone tell me exactly what should be pasted into the index to get this running? Ideally, can you just copy and paste exactly what you use in your index to get the plugin to activate.
September 12th, 2005 at 11:47 pm
Hopefully this comment gets through as my first is still in moderation…How do you get the Permalink to show up? I don’t want a # symbol for the permalink, but the title of the post itself.
I’ve tried %permalink% and many other variations(that I could think of or find in the plugin code itself) but nothing seems to work. I just want to the title of the post to be displayed as the permalink. How can I do that?
September 22nd, 2005 at 2:08 pm
I’m getting the exact same error as sabina
October 8th, 2005 at 8:45 pm
Just to let you know, the code directly copied and pasted wont work, and will produce a T_STRING error, because the wrong quotes are used. All quotes must be made into ” and in the comments_popup_link(”(0)”, “(1)”, “(%)”); bit.
October 18th, 2005 at 9:09 pm
Okay, here we go.
@ Carla — Thanks, fixed now.
@ Sabina & Joshua — The sample code above contained curly quotes, as Carla and Kitty pointed out (thanks!). I’ve changed them all to straight quotes, so the sample code should work now.
@ fansipan and HongPong — This should be fixed now.
@ Matoo — Hmm, I’m stumped on that one. I’ll have a look around the code, but I’m not experiencing the same issue personally, so the best I can guess is that another plugin is accidentally deleting the setting.
@ Ed Fladung — I’m almost positive there isn’t a way, short of the author of your Recent Posts plugin (or yourself) adjusting the Recent Posts code to accommodate mini posts.
@ Carlo — The last argument for
get_mini_posts()is where you can specify a limit. I just noticed that this feature wasn’t explained above, so I’ve fixed that.@ JoAnne — Looks like you have some whitespace after the ?> at the end. Remove that and it should be dandy.
@ Christoph — My original intent with the plugin wasn’t to have full posts in the sidebar, but I’ll certainly work on making that possible with future versions.
@ mainmac — WP looks for the comments at the very beginning of the file to recognize that a file is a plugin, so if you left those out, that would do it. Other than that, I can’t see why it wouldn’t recognize the file as a plugin… Even whitespace above should still be recognizable by WP, although it would generate header errors. So to make a long answer short, I dunno.
@ Scott — Currently you can’t use the title of the post in its link, but it’s on my list. You can, however, customize the link text to be something else. It’s the second argument to
get_mini_posts().Phew! Sorry for the delayed responses everyone!
October 27th, 2005 at 9:28 pm
You’re probably going to think I’m a complete idiot for asking this, but I know next to nothing about PHP and honestly don’t know how to do it: How do I put a space between Mini Posts? I know that in HTML you can use p or br, but I have no idea where to put it in the plugin file!
Ok, you can point and smirk now.
October 28th, 2005 at 4:58 am
Awesome plugin. This is exactly what I was looking for, thanks!!!!!
October 30th, 2005 at 7:10 am
Ok, quick question that is probably going to make me look like an idiot… LOL
I know about the argument that allows one to limit the number of posts shown but how do I add that to the code exactly? I’m really not very good with decifering PHP. *blush* Thanks!!
October 30th, 2005 at 2:29 pm
@ Jill: I’ve updated the final example above to include the limit argument. Let me know if you still need help, I’ll be happy to explain.
October 31st, 2005 at 7:22 am
Ahhhh… I think I got it. Somehow I had messed up placement of arguments in the tag. Oops! Thanks!!!
November 6th, 2005 at 12:26 pm
I am having the same problem as Scott. I have the plugin activated, there is no white space in the file at all. I am putting the get_mini_posts function in my sidebar but it’s not calling anything. You can see an example here, http://daisyhead.org if you scroll down and look in the “Little Petals” section.
Can anyone offer any help?
November 6th, 2005 at 12:37 pm
Duh. Sorry, I got my mistake. I should have been using: to call the info in.
Great plugin. Thanks so much!!
November 6th, 2005 at 12:50 pm
One more quick question. I am currently combing through the code to see if I can figure this out, but so far I’m not having much luck. I want to remove the “#” and permalink from the output. How do I do this?
Thanks!
November 6th, 2005 at 1:01 pm
Never mind.. got it. *blushes* I really should try on my own before I ask for help. I almost always can figure it out.
November 11th, 2005 at 2:16 pm
Morgan - looking forward to having the post title available to get_mini_posts(). Great work !
November 12th, 2005 at 11:49 am
I dont get it.. what does this do.. all your examples were the same.
December 6th, 2005 at 12:16 am
[…] Suitable for a sideblog (see “Bits on the side” in the, um, sidebar) but can also show mini-posts within the loop. Documentation is here. I just fiddled with it a wee bit to get the post title to display, otherwise it was a plug-and-play installation. Em³ wrote this in […]
December 22nd, 2005 at 1:06 am
Like many others I want to display mini-posts in the sidebar. But the get_mini_posts() function just isn’t cutting it for me. I need full control over post output in the sidebar like I would have if it were in the loop.
More specifically I have a function call to the_content() that automatically truncates text, removes images, and generates a permalink, and I really have to use that for my mini-post sidebar to work with the content I have lined up for it.
I tried creating another loop in the sidebar and using the is_mini_post() function to try and make this functionality, but of course with the plug-in filtering out mini-posts from the loop this just doesn’t work, and I cannot turn of this filtering or else it will mess up my primary loop!
Thank you so much for the great plug-in, it really is the best solution for what I want to do. It just needs a bit more customizability for my wacky WordPress setup!
December 27th, 2005 at 4:42 am
I guess you can’t have get_mini_posts() twice, eh?
I tried to have recent mini posts in my footer, and then I made a page with all of them. But the footer didn’t load at all.
January 4th, 2006 at 1:10 pm
I am too dense to figure this out.
If I just put:
get_mini_posts(”%permalink% …%post% — %commentcount%”, “¶”, “no comments”, “one comment”, “%s comments”, 3)
into the sidebar, nothing is happening?
what am I missing?
January 11th, 2006 at 10:52 am
Awesome plug!
Best I can tell, there is zero way of having the Title (permalink text) of my minipost on the side bar? I don’t care if it’s a link or not, but it’d be nice to at least have the title somehow…
Thanks!
January 13th, 2006 at 3:56 pm
Hi, I’m using your minipost plugin and it’s great.
I have one nagging need though, how do I get different catagories of miniposts to show up on different pages?
Ideallly if in the minpost query I could specify a catagory number that would be ideal.
Is there a way I can hack this myself?
thanks,
Karl
January 15th, 2006 at 9:17 pm
I have the plugin uploaded and installed. The Options | Miniposts menu tries to take me to /wp-admin/mini-posts.php, which, obviously, doesn’t exist. What file goes there, just a copy of the plugin file?
January 17th, 2006 at 10:01 am
hello,
i just discover mini-post. lokks great. but i can get it works. i have installed and actived it but then what to do ?
where can i get this “get_mini_posts() ” that i should put in the sidebar’s template ?
thank for the help !
February 19th, 2006 at 9:28 am
is there any chance we can get this great plugin copatible with wordpress 2.01?
it would be greatly appreciated
March 1st, 2006 at 9:24 pm
Is this compatible with WP 2.0? Because I get parse errors with it.
:-(
March 13th, 2006 at 11:59 pm
I’m having a fairly stupid problem with the limit function. All I want to do is set a limit and keep all the defaults. I can usually make php do the tiny things I want, but I’m not very fluent in it, so I apologize for my stupidity.
get_mini_posts(3) doesn’t do anything. I can copy and paste the variant code from above and get the advertised result with the paragraph signs and a limit on posts, but trying to turn that code back into what I want doesn’t work. Can anyone tell me exactly the code to use if I like all the defaults but want to limit the number of miniposts displayed?
March 27th, 2006 at 9:57 pm
Morgan,
I am using your plugin for my “Books I’ve Read” section. With some customization of course.
April 9th, 2006 at 5:44 pm
[…] I’m testing the mini post plugin that can be found at Doocy.net […]
May 10th, 2006 at 7:49 am
[…] MiniPosts This is a mini post Dieses Merkmal benötigt eine iframe Unterstützung […]
May 14th, 2006 at 5:41 am
can this work with wordpress 2.0?
June 1st, 2006 at 5:24 pm
Hi,
1st, thanx. This one of yours is my first choice for an ‘Asides alike plugin’ at WordPress.
I have a (tiny) bug to report, though and a feature:
1.- the_bug: The inputbox to make a post ‘mini’ switches to off everytime I edit them. (for now I know it and just doublecheck before submitting but still a issue).
2.- the_feature: Already asked for in this thread but just as a reminder
I’d love to have the possibility to include the title of the post within the ‘minipost’-self. %title% or so
Thanx again,
hip
June 2nd, 2006 at 3:39 pm
[…] . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. […]
June 11th, 2006 at 5:25 pm
[…] As you can tell, just added the Morganically Grown Miniposts plugin for quick aside comments. Not 100% sure how this will affect the blog, save that it opens the way for even more “quick and trivial comments” to find their way into the blog. […]
June 13th, 2006 at 4:57 pm
Great little plugin. I have, however, noted one oddity (I don’t think it is serious enough to be a bug its just odd).
I’m using the “Ultimate tag warrior” plugim, and I’m noticing that the mniposts plugin appends the tag names to the end of the text, but only in the RSS2 feed.
See blog here: http://memetic-selection.no-ip.info/
See blog RSS2 feed here: http://memetic-selection.no-ip.info/?feed=rss2
If a minipost is long enough, the “tag terms” get truncated out of the feed entry - but if the minipost is short enough, they show up.
Don’t think this is a critical problem, but perhaps its something to look into.
June 24th, 2006 at 5:21 am
I have a slightly odd problem. For every Mini-Post I create, a new list is shown. So, if I make 3 miniposts, 3 lists will appear, all of them listing the 3 miniposts, like so: http://www.draftlab.net/miniposts_problem.jpg
What might the problem be? My code in index.php looks like this: http://www.draftlab.net/miniposts_problem.txt
September 6th, 2006 at 5:29 pm
I am having the same issue as Maya had with the limit function. I want to keep all the defaults but just be able to limit the number of MiniPosts displayed. Can anyone offer any help?
October 23rd, 2006 at 8:36 am
HI all, I have tried for several days to get a miniblog type thing in my sidebar but I have no idea what I am doing.
Every one I try does not have very good instructions for those who know nothing about coding.
Please can somebody help me. I Have installed mini posts and activated it and it shows up on my write page. But what code do I need and where do I put the code to have the miniblog show up in my sidebar?
I tried putting piece of code in a text widget but it just shows the code. Please help before I pull my hair out.
November 15th, 2006 at 12:01 am
hello miniposters.
i would like to display one random (mini)post with a picture included on my sidebar. is that possible with the plugin? thanks for any help.
December 31st, 2007 at 11:08 pm
hair removal products
laser hair removal, hair removal, hair removal product, hair removal products
January 1st, 2008 at 12:36 am
laser hair removal
laser hair removal, hair removal, hair removal product, hair removal products
January 1st, 2008 at 3:34 am
hair removal
laser hair removal, hair removal, hair removal product, hair removal products
January 3rd, 2008 at 4:37 pm
hair removal product
hair removal, laser hair removal, hair removal product, hair removal cost
January 3rd, 2008 at 7:50 pm
hair removal cost
hair removal, laser hair removal, hair removal product, hair removal cost
January 4th, 2008 at 3:55 pm
hair removal
hair removal, laser hair removal, hair removal product, hair removal cost
January 5th, 2008 at 5:44 pm
laser hair removal
hair removal, laser hair removal, hair removal product, hair removal cost