WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Setting limit number for MiniPosts plugin

[Resolved] Setting limit number for MiniPosts plugin

  • I am trying to set the limit for the number of posts the MiniPosts plugin should show. I have tried editing the code per Doocy’s instructions but no matter what I put, it’s not working. Would anyone be able to give me a pointer or two? I want to limit my posts to 2 or 3.

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • I should mention that I want to keep all the defaults and just be able to limit the number of posts displayed.

    I tried again to figure this out myself but no luck.

    Grr! I love and appreciate all the time and effort plugin developers put into helping me make my blog a prettier/niftier place but sometimes I wish they would document a tad bit better for those of us who don’t quite speak the lingo.

    Bueller?

    Anyone?

    Okay, I’ve posted on the plugin developer’s site and still haven’t gotten any help on this. Can anyone help me figure out how to limite the number of posts that this plugin displays?

    I’ll give you a nice shiny quarter! 😉

    Okay, the developer has now turned comments off for this plugin on his blog. My question went into moderation and didn’t even get to be displayed on his blog.

    Can anyone take a look at this plugin and tell me what code I need to put to only display 2 posts? I should mention that I want to keep all the defaults for this plugin and just be able to limit the number of posts displayed.

    In your index.php (or wherever you call the miniposts plugin), there should be a line that says get_mini_posts() which will call the basic function using the defaults

    Earlier in the page, he says get_mini_posts(format, permalink_text, zero_comments, one_comment, more_comments, limit) is the structure for the function, so to use the defaults mostly, but change the limit, you’d pretend to fill in the defaults — but with nothing there.

    So, try get_mini_posts(,,,,, 2) (it works best to copy the whole function, and delete the bits you don’t want).

    Hope this helps!

    When I try modifying the code like that, all it does is put the options as text.

    Here’s what I have: <?php get_mini_posts(“,,,,, 3”); ?>

    But all I see after the actual content is /////3.

    This is the strangest plugin I’ve worked with so far. None of the usual modfications seem to work with it. Any other ideas?

    what happens if you lose the double-quotes?

    It throws an error.

    Actually, if I use a single tick, I just get the same thing. If I take them out all together, I get a parse error.

    In the plugin, there’s a function function get_mini_posts($format = '%post% %commentcount% %permalink%', $permalink_text = '', $zero_comments = '', $one_comment = '', $more_comments = '', $limit = '')
    what happens if you set $limit = '' to something like $limit = '2'?

    (Just guessing, here, obviously)

    That did it! I swear I tried that before and it didn’t work. Thank you so much Logista!

    *phew* I’m glad it worked out — that’s at my limit of plug-in programming knowledge 😉

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Setting limit number for MiniPosts plugin’ is closed to new replies.
Skip to toolbar