WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Question about the Loop.php template (5 posts)

  1. dillones
    Member
    Posted 4 years ago #

    I was looking at the loop.php file in the Twenty Ten template.

    I was wondering if containing your loops in a separate file is recommended now.

    The reason I ask this is because I feel like it is a lot simpler & cleaner managing the individual loops in each template file over having one giant loop, & I want to know if they are recommending running the giant loop, like the one in TwentyTen or if that is just something specific to that theme.

    So basically the big question is should I be placing all my loops externally now or is that just the method used for TwentyTen. Is it bad practice to have separate loops in each template file? What are the benefits of the giant loop?

  2. Safirul Alredha
    Member
    Posted 4 years ago #

    You should if that's easier for you to work with multiple loop. Twenty Ten is just an example for you to extend.

    see: http://codex.wordpress.org/Function_Reference/get_template_part

  3. dillones
    Member
    Posted 4 years ago #

    Okay I just wasn't sure if it was a new template that was apart of the actual hierarchy!

    Thanks much.

  4. oldcrone
    Member
    Posted 4 years ago #

    Can anyone point me to help with WordPress 3.0 loop.php file. I want to remove the post date and author info page from the index.php file and don't see the codex for this in the loop.php file.

  5. meganano
    Member
    Posted 3 years ago #

    Ha. The codex page on the loop: http://codex.wordpress.org/The_Loop doesn't really acknowledge the new usage of loop.php, which was not part of older wordpress installations. The items that were in loop.php used to be held in index.php. Aren't we getting a little carried away with sub-pages in themes now?

    In any case, only two changes have been made to the codex page on the topic and I'm not entirely sure if they accurately cover the new usage of the loop since I'm just figuring out how to design themes for the new wordpress.

    Is there any current accurate guide to wordpress online, or is it all just cobbled together from the original and outdated codex?

Topic Closed

This topic has been closed to new replies.

About this Topic