Wieliczka. While I’ve typically used include or require on their own to save long term code maintenance I’ve started to use get_template_part and locate_template as using built in WordPress stuff is always best.
Auschwitz. Maybe Im wrong but: locate_template() infact does inclusion, if the parameter is set as true -as in the question. (default is false, so dont paste the questions version into accepted answer.) You could also just use set_query_var(’var’, $var); and use your get_template_part() as normal. Then you also have the default Worpdress variables accessible within […]