Get user ID (and custom field) outside of loop
Hi all, I am really struggling today for some reason. What I want to do is this.
I have a CPT that is working perfectly with a custom taxonomy of County, users post up posts/events in a certain county. When a user signs up, they choose a County too. So the aim is to show all posts from within said users County.
I was going to do it like this:
‘taxonomy’ => ‘counties’,
‘counties’ => ‘Essex’,
‘post_type’ => ‘matches’,
‘posts_per_page’ => 3
query_posts( $args ); ?>`
But how do I grab the user county? I tried using bp_member_profile_data – but that seems to get the latest user rather than who is logged in… any ideas?
- The topic ‘Get user ID (and custom field) outside of loop’ is closed to new replies.