Skip to main content

Just my two cents for future references, a workaround at least in Wordpress 3.5 is to add the variable to $wp_query->query_vars$wp_query->query_vars.

I needed my global _vk_errors_vk_errors inside a template part and just did $wp_query->query_vars['_vk_errors'] = $_vk_errors;$wp_query->query_vars['_vk_errors'] = $_vk_errors; before calling get_template_part()get_template_part().

Just my two cents for future references, a workaround at least in Wordpress 3.5 is to add the variable to $wp_query->query_vars.

I needed my global _vk_errors inside a template part and just did $wp_query->query_vars['_vk_errors'] = $_vk_errors; before calling get_template_part().

Just my two cents for future references, a workaround at least in Wordpress 3.5 is to add the variable to $wp_query->query_vars.

I needed my global _vk_errors inside a template part and just did $wp_query->query_vars['_vk_errors'] = $_vk_errors; before calling get_template_part().

Source Link

Just my two cents for future references, a workaround at least in Wordpress 3.5 is to add the variable to $wp_query->query_vars.

I needed my global _vk_errors inside a template part and just did $wp_query->query_vars['_vk_errors'] = $_vk_errors; before calling get_template_part().