WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Opinion, please: multiple loops (9 posts)

  1. hooopla
    Member
    Posted 9 years ago #

    I want to display items from one category at the top of my site, followed by items in another category. (There are only the two categories and no item belongs to both.) And I want both categories to display in date order.

    I've studied the examples of multiple loops in the Codex and have an index.php that's doing what I want. My only doubt is that I may not have coded it as efficiently as possible, and there may be potential drawbacks with what I've done that I'm not aware of.

    Would some kind, knowlegeable person please take a look at this index.php code and give me your opinion?

    Thanks.

  2. clarke1866
    Member
    Posted 9 years ago #

    Looks pretty good to me dude. Although your site doesn't come up (its blank).

  3. hooopla
    Member
    Posted 9 years ago #

    Thanks! (This code is running on a test site, which is why you don't see it.)

  4. moshu
    Member
    Posted 9 years ago #

    I was wondering where did you get this template tag:
    <?php wp_pagenavi()?>
    I don't remember it. Which doesn't mean anything :)

  5. hooopla
    Member
    Posted 9 years ago #

    Hi moshu. That's for GaMerZ' WordPress 1.5 Page Navigation plugin.

  6. moshu
    Member
    Posted 9 years ago #

    OK then. If I knew all the plugins... :)
    The rest of the code seems to be fine. But, of course, the main question is: does it work on your test site? If yes, then it's OK, I guess.

  7. hooopla
    Member
    Posted 9 years ago #

    Yes, it definitely works. But since the index is the heart of most sites, I just wanted to be sure I hadn't made any beginners' mistakes with this multiple loop.

    Thanks.

  8. somefool
    Member
    Posted 9 years ago #

  9. hooopla
    Member
    Posted 9 years ago #

    Thank you, somefool. That is really helpful!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.