WordPress.org

Forums

Change Amount of Posts Displayed (9 posts)

  1. lilgoaliebro
    Member
    Posted 6 years ago #

    I Want to change how many posts are displayed on my main page so I wen to Options> Reading> and changed it from 10 to 5. But apparently it tells me the URL cant be found and thats it. How do I change it and get this problem to stop? My Site is at http://darknemesisstudios.co.nr/

  2. flick07
    Member
    Posted 6 years ago #

    I don't know much about PHP and stuff, but I only wanted two posts showing up on my main index page. I went through the template I was using and added:

    <?php
    query_posts('showposts=2');
    ?>

    once the posts had been called in the main template. I hope that makes sense. Worked for me.

  3. moshu
    Member
    Posted 6 years ago #

    For non-coders that's a complicated solution.
    Better use a plugin, and with that you can have different number of posts shown on different views, like: index (home), archives, search, category etc.
    http://mattread.com/archives/2006/01/custom-query-string-27/

  4. moshu
    Member
    Posted 6 years ago #

    Quote:
    My Site is at http://darknemesisstudios.co.nr/

    That's not true - your site is here:
    http://www.darkonem.catch-free.com/
    WP "hates" redirects, so that might be your problem with the not found error...

  5. lilgoaliebro
    Member
    Posted 6 years ago #

    It cant be the url becuase in wordpress it knows the real site URL. But The co.nr/ is just for telling people the site. I'm an experienced HMTL and CSS code so I'll try flick's solution first, then I'll try moshu's. Thanks for the help.

    EDIT: okay I tried the code and it works. But at the bottom of the page it says "previous entries" so I clicked it. On that page it displays the newest 5 posts that were on the main page! So is there another way to do this so the previous entries are not the same? I really dont want another plugin.

  6. flick07
    Member
    Posted 6 years ago #

    Do you still have the reading settings set to 5? That could be what's causing the Archives page to only show that amount. Try changing that setting to the maximum and see what happens.

    Just to be clear though, did you want 5 posts on the main page, then the previous entries link to show all of the entries, or just the entries after the first five?

  7. lilgoaliebro
    Member
    Posted 6 years ago #

    When I go to the settings, it is at 10 and when I click the link to change it to 5, it says the URL is missing. I cant make it bigger or smaller.

    I want 5 posts on the main page, then the previous 5, then the previous 5 and so on. If all the previous entires were on one page it would be huge. I mean I already have 13.

    So is there something to make this happen or to fix the Options page?

  8. flick07
    Member
    Posted 6 years ago #

    It may have to be a plugin if you want each archive page to show five posts at a time. I'm not overly familiar with PHP, but I'm assuming that a code could be written to read previous five, previous five from five etc.

    Hopefully someone else can offer some advice?

  9. lilgoaliebro
    Member
    Posted 6 years ago #

    Well I decided to go with the plugin and it totally fixed the problem. I can change how much I want by date, category, day, etc. Thanks for all your help.

Topic Closed

This topic has been closed to new replies.

About this Topic