Hi!
We are trying to build a query using the Views filters based on a result from a custom field. Basically, we've used an outside set of functions (check it out here: hidden link) to print a set of custom fields, which does this: A) loads all "subscriber" users into a radio group list, and B) allows the author to assign the post to one of them.
So far, so good: We can see our custom field (lets call it
) when we start building our query using the filter editor on Views, and we can even print it on the template area. So, if we have previously selected the username "greenperson" through our custom field, then i can print "greenperson" inside the template of the post assigned to that user. That means that the value of that custom field it's working fine, but what we need to do is this:
1. Get the current logged in user: we could do this using
, e.g.: we could assign it to a
variable (in fact, we are already doing that in our functions.php file).
2. Then, if
$custom_user = $current_user
: give me the posts that match that criteria.
So, to be brief: using the query builder filters, how can I ask for
and then compare it with the result of a custom field?
Any suggestions?
Thanks in advance!
PS: and BTW, Views and Types are one of the most awesome plugins we have ever used. Thank you so much for creating this! I'm not posting this on the Paid users support Forum because my partner, how is the person who bought Views, is not here right now and I can't access using his account.