Passing variables to templates (alternatives to globalizing variables)

You could also use this function:

set_query_var('foo', $foo);

WP will extract and expose all query variables in every template it loads, so you will be able to access it as $foo

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)