I am currently building a network of blogs for individual real estate agents. Currently, a broker will have a main site, with agents sites added as subdirectories, e.g., www.example.com and www.example.com/agent. Each agent's
front-page.php template has an area which displays the agents contact info. I am currently using
get_user_meta() in my theme template to access user information from the user profile, but I have quickly realized that when I access that data, there is no relative way to access the user of a specific subdiretory's information. When I use this code:
echo get_user_meta(2, 'display_name', true);
in the theme template, it defaults on every install of that theme across the network to the
user_id=2s information. Logically I understand why. But how can I get Joe's info to show up on www.example.com/joe and Chris's info to show up on www.example.com/chris? I am looking for a solution that can be defined within the admin somehow, so scaling this theme is as simple as possible.
EDIT: I guess now that I think about it, a possible solution would be to create a theme options page using
get_option to call entered information. I was just hoping there was an easier way retrieving user information since some of it is already created during user creation. If you think you have a good solution to this problem, I think it would be worth writing about. I have not been able to find any info regarding user_meta and multisite in this way.