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 ?
Leave a Reply
You must be logged in to post a comment.
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 ?
You must be logged in to post a comment.
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.
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.