Global object variables in template/functions.php

I am making a new template and want to add custom template functions.
I can't access Global object variables from there, for example:

`function test() {

print_r($_zp_current_album);

}`

I think I have to include a file in functions.php but I am not sure which?

Comments

  • OK, nevermind, found I needed to define the object with global.

    `function test() {

    global $_zp_current_album;

    print_r($_zp_current_album);

    }`
Sign In or Register to comment.