I'm trying to do this:
$myVPname = get_the_title();
$vpArgs = array(
'post_type' => 'loan_closings',
'meta_key' => 'originator',
'meta_value' => $myVPname //if I use 'Fred Smith' it works
);
$vpLoop = new WP_Query($vpArgs);
Thoughts?
I'm trying to do this:
$myVPname = get_the_title();
$vpArgs = array(
'post_type' => 'loan_closings',
'meta_key' => 'originator',
'meta_value' => $myVPname //if I use 'Fred Smith' it works
);
$vpLoop = new WP_Query($vpArgs);
Thoughts?
the syntax looks ok;
have you tried to print $myVPname to see if it contains what you assume?
just bofore the line with your query;
example:
print_r($myVPname);
actually i had used echo $myVPname;, and that did output what I expected. I tried print_r() and it gives me the same. Does it matter that my value has spaces in it? I've even tried to convert the value to a string first...
Help?
You must log in to post.