Wordpress $args not returning anything?

Hi guys,

I’m working with the Roots Theme on a few projects and just, for the first time, attempted to

echo $args->theme_location

with no success. I attempt to

echo $args

and nothing was returned at all.

Perhaps I’m just missing something small but I can’t seem to get it to come up with the bit of head bashing I’ve done so far.

Any help is much appreciated.


I don’t think WordPress ever uses $args in a global scope. What are you trying to do?

Yeah… what is $args? There’s no details for us to work off of here.

Oh man. Sorry guys. Late night, dead brain… it was for use within a function for a WordPress filter. Just forgot to make the $args variable a parameter for the function.

Thanks anyway!