Tell us what you are trying to do?
I have a brand new directory site in which I created a directory page, listing WP user profiles. It displays only a few fields from each profile (name, email, phone.) A link at the bottom of each displayed profile in the directory listing should open and display the full profile (based on a content_template single.) But, I can't figure out how to make that link work so it displays the profile using the content_template single. It opens the template, but always displays the WP profile data from the current user, not from the user select from the Directory page.
What I currently have:
Page: "Patel Directory" - calls [wpv-view name="Member Profile Directory"]
View: "Member Profile Directory" - User view, any role, order by register date, no filter, no pagination, calls [wpv-post-body view_template="Member Profile Short"]
Template: "Member Profile Short" - Displays WP User profile fields, a few extended Types User fields, and includes a "View Profile" link at the bottom that links to the page, "Member Profile" to display that selected view as a single view with more information (more user fields.)
Page: "Member Profile" - calls [wpv-view name="Member Profile Full"]
View: "Member Profile Full" - User view, any role, order by register date, limit 1 item, no pagination, filter = Select users with the id determined by the URL parameter "users-filter" and with role "(any)" eg. yoursite/page-with-this-view/?users-filter=1
Template: "Member Profile single" - Displays a more full profile including WP User profile fields plus more extended Types User fields.
Is there a similar example that we can see?
Sort of. I have done this for a different site, but it uses a CPT for profiles, not the WP user_profile, so I use [wpv-post-url] but of course that won't work for a User. - See the working CPT site here: hidden link
What is the link to your site?
Site is currently at: hidden link
If you have a User View when you insert fields you have the user selection option where you can specify if it should be the user from the View loop or the currently logged-in user, and it defaults to the user from the loop which is what you need.
In my simple test site for a user View I output the display name and a custom user field, and the source in each case is the current user from the loop.
The funny thing is, the URL looks correct, such as: If I click the "View profile" link in one of the short profiles displayed on the Directory (listing) page, the URL looks like: hidden link
So, the member-profile is the correct page, and the users-filter=2 is the second small profile displayed on the directory page, BUT the data is coming from the current logged-in user every time ("Boss Man" instead of "Mickey Mouse".) I am getting data, but they are from the wrong user. Note that the user_ids are 1,2,3,4,5.
Please let me know if you now understand the problem.
I got it to work. I had the views set up properly. The problem was in the Page: Somehow the Content Template on the page was selected as "Member Profile Full". But, there should not be a content template set for this page since I am relying on the View to handle that. I set the content template to "None" and everything works as expected.
I guess the setting of that content template is conflicting with the calling of the Views shortcode?
If you have a template assigned to the page then the page content (where you inserted the View) wouldn't be output at all, unless the Member Profile Full template included the post body, so maybe it was outputting a similar-but-different View?