Forums

[resolved] Limit sidebar posts (widget missing?) (5 posts)

  1. iusbpreface
    Member
    Posted 5 years ago #

    Hey Guys, thanks for reading.

    I am trying to limit the number of recent posts in my sidebar from 25 to 5.

    This is what the code looks like for my theme editor:

    <div id="postings"><?php the_recent_posts('title= '); ?></div>

    I've read the forums, and some have suggested to others that they could find their answers in wp_content > pugins > widget > widget.php.

    BUT I don't have that file! There isn't even a "widget" folder in my plugins section (although I did add one later).

    Any help?

  2. lexhair
    Member
    Posted 5 years ago #

    The the_recent_posts tag is supported by the Fuzzy Posts plugin not natively by wordpress.

    Use a widget ready theme, activate this plugin and you can configure it any way you like using the Options in the Admin page. If your theme isn't widget ready, you'll have to ask the author of the plug in how to configure that argument. It's not obvious in the documentation.

    Widget folder is in any WP install package in the wp-content folder.

  3. lexhair
    Member
    Posted 5 years ago #

    Oops..bad advice. Get the widget folder here.

  4. Otto
    Tech Ninja
    Posted 5 years ago #

    I am trying to limit the number of recent posts in my sidebar from 25 to 5.
    This is what the code looks like for my theme editor:
    <div id="postings"><?php the_recent_posts('title= '); ?></div>

    Just change your code to this:
    <div id="postings"><?php the_recent_posts('max_num=5&title= '); ?></div>

    If you're not using widgets, then you wouldn't expect there to be a widgets folder. And frankly, your problem has nothing to do with widgets in the first place, so I'm not sure why you even brought it up...

  5. iusbpreface
    Member
    Posted 5 years ago #

    Awesome guys, thanks very much!

    I mentioned widgets simply because my advance research revealed that several other people had the same apparent problem as I did. However, each of them were told to go to their widget folder and make adjustments. Otto, your answer was much easier!

Topic Closed

This topic has been closed to new replies.

About this Topic