Viewing 4 replies - 1 through 4 (of 4 total)
  • this thread is about the plugin “sidebar widgets”. if you don’t use this plugin (you don’t need to), you can limit the number of posts with

    <?php wp_get_archives('type=postbypost&limit=X'); ?>

    in sidebar.php in your template directory, where X is your desired number of posts.

    Thread Starter Opally

    (@opally)

    mdi, thanks for the reply!

    I’m using K2 theme, and I found this in its sidebar.php:

    <?php wp_get_archives('type=postbypost&limit=10'); ?>

    but the odd thing is that I’m seeing 5 recent posts, not 10. (I’d like to see 10!)

    Where is this “5” getting set?

    I suppose I need to take this issue to the theme publisher, not WP, if sidebar.php is a theme file.

    Thread Starter Opally

    (@opally)

    AH never mind, I found it finally.

    Admin > Presentation > widgets > click on the “recent posts” icon, edit number (and title), and enter (or click away and “save changes”.

    Wow, WordPress keeps amazing me with the number of features, I didn’t realize there were these settings for sidebar plugins!

    Thanks for the help! ??

    Related to this, our sidebar number of posts is not updating automatically. It says 0 posts when we have 8 so far. I see where the PHP code is in the sidebar, but I haven’t touched it. Anyone have any ideas? (Also, we are sadly only able to use WP 2.0.4 due to our hosting company.) Thanks!
    https://csdesignworks.com/blog/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change number of Recent Posts in sidebar’ is closed to new replies.