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 ?

2 Answers
2

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.

Leave a Comment