Forums

Altering amount of posts shown (not in admin) (4 posts)

  1. varbar
    Member
    Posted 3 years ago #

    Hi,

    I have searched and cannot find a way to alter how many posts are shown within the loop, apart from within the admin panel.

    For example, on my homepage I would like 1 post (the latest) shown and on the categories I would like 10 posts.

    Anybody have any ideas how I can achieve this?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

  3. varbar
    Member
    Posted 3 years ago #

    Thanks, I guess I gave a bad example. Is there any way to just specify how many posts you want to load in. 2 on one, 6 on another etc...

    Cheers

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    The figure you use in admin/Settings/reading applies globally. The only way you could over-ride it is to create a custom loop for either your home page (I'm assuming index.php) or your categories (category.php).

    http://codex.wordpress.org/Template_Tags/get_posts

Topic Closed

This topic has been closed to new replies.

About this Topic