Help using a variable in a function parameter
-
I have the following code in a plugin:
if( $var != '' && !is_user_logged_in() ) { if( is_child( $var ) ) { auth_redirect(); } }$var is functioning as intended on the page and I use it elsewhere in the template, but it’s not working when used as a parameter for the is_child() function.
If I put the ID number manually as the parameter.. it works perfectly.
Can someone help me figure out why please?
The topic ‘Help using a variable in a function parameter’ is closed to new replies.