WordPress.org

Ready to get started?Download WordPress

Forums

narchives $posts_per_page hack. (5 posts)

  1. cron
    Member
    Posted 9 years ago #

    Ok, I have been searching for the answer to this question and I just finally found it. I thought I would post it here to make other's lives easyer. If you are using the Narchives plugin in your wordpress template you might have had the problem where onley 6 or so links were showing up. The reason this happens is because your main blog page is set to onley display 6 posts on a page. One quick hack to fix this problem (if you are using .htacess rewrite rules) is to switch the redirect URL from example.php to example.php?posts_per_page=-1

    I hoped that helped others out there with this problem. Also if anyone has a more elegant hack please let me know. I would greatly appreciate it.

    Cron

  2. amory
    Member
    Posted 9 years ago #

    you can also just put <?php posts_per_page=-1 ?> at the top of the page

  3. DianeV
    Member
    Posted 9 years ago #

    Where at the top of the page?

  4. cron
    Member
    Posted 9 years ago #

    I know that, I tried that but it did not work. I also went and manually replaced all the places it said $posts_per_page with -1. Still it did not work.

    Any other sugestions anyone?

  5. amory
    Member
    Posted 9 years ago #

    a) <?php $posts_per_page = '-1'; ?> - you need the single quotes
    b) very top of the page, ie before the doctype

Topic Closed

This topic has been closed to new replies.

About this Topic