How to pass a variable to get_template_part that’s updated every time the template part is called?
I have a loop and in that loop I use a get_template_part to call the HTMl for the post to display. I also have a variable (number) to which +1 is added every time the loop runs. In this way I can track which post is displayed (for a specific layout). <?php $loop_post
0get-template-part, loop, php, query-variable, variables 3 years 0 Answers 89 views