Loop.php vs looping inside template file

What is best practice for WP with regard to using loop.php (loop-single.php, etc) versus looping inside the template file? Does it matter with regard to efficiency or ?

Related posts

Leave a Reply

2 comments

  1. Depends on whether you would use that single-loop in more places. If you’re only using it in one place and that will remain the case, do it within single.php, if you’re going to be reusing it elsewhere, I’d highly suggest using a single-loop template part.

  2. No, it’s just a Q of organizing your theme files. It’s template vs. template part. Later will do some searching inside your parent & child theme and then include your template part, but that doesn’t do much perfomanze decrease.