Does get_template_part pull data once in a loop?

When i use the "get_template_part();" inside a loop, does it search for that template file every cycle of the loop (each post) or does it search for the file once and then reuse it every cycle of the loop?


That depends entirely on your code. Without seeing any, i will assume you are using a standard WP loop. If so, the template part is included every time the statement is executed. By default that is for every post in the loop.

Category: loop Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 1.494 (s). 13 q(s)