The easiest way to achieve this would probably just be with some kind of switch-to-user plugin. Although this wouldn’t work if you needed that page to be filterable exclusively from the front end.
The cleanest way to achieve this would probably be with some kind of facet/filter that allows you to select a user and then modifies the query of the page based on that. There are a few examples on this forum of people using FacetWP for this, but it requires digging into a bit of PHP.
I’d think that the two most L&L-centric ways of achieving this would either be with a form plugin or a URL query. The URL query would probably be a bit messy since you couldn’t create a convenient dynamic control in the current version of L&L. I’m imagining you could dynamically generate a list of users with links to the current page with a URL query added and then you could filter the loop on your page based on whether that URL query existed on the current page. The syntax for getting information about a URL query can be found here. Alternatively, you could try to find a form plugin that allows you to get a value from a particular form entry. There are performance tradeoffs to this approach since you may need a separate plugin, but a quick search seems to indicate that Formidable Forms offers this kind of functionality. So you’d have a dropdown selection option in your form allowing you to select a user and then you could use the shortcode to refer to the value selected by the user in the L&L template. Honestly, neither of those options sound quite perfect, but they’re potential avenues to look into.
Once Tangible Blocks has form fields that can be displayed on the front end of the site, then all of this will be way easier, but for the moment these options are what are coming to me. There are probably other approaches I haven’t thought of.
Unrelated to your question, it looks like you’re currently using an If
tag to filter the results of your loop. This is the most flexible approach, but it’s also the worst on performance because you’re looping through every post and then running conditional logic on each item to find out if you should display data about the current item. You might want to read through the part of the Loop
tag documentation about filtering the loop to understand the different approaches you might want to take in your template.