I am building a site for a travel agency. Each agent needs to have his/her own public profile page. I want each agent's profile page to be accessed at
agentname being the agent's username. This would load an agent profile template populated with the given agent's profile data.
I still need other non-agent segment-1 pages to continue working also, like
agencyname.com/group-travel. These would be 'normal' template pages.
Is there any way to make this work dynamically? Creating a dynamic route with only a token in Segment 1 breaks access to other regular pages. I don't want to have to create a hard route every time we add an agent, and we don't want to add another segment like
agencyname.com/agent/agentname. We want the URL each agent puts on their business card to be as clean and easy to remember as possible.
I'm thinking something along the lines of this logic:
If Segment 1 matches a username Display the profile template for that user Else Continue routing per the normal routing checks
I don't have the knowledge to build a plugin, or the budget for someone else to. I'm seeking solutions that could be implemented without a plugin (unless there's already a plugin available).
Any constructive thoughts are appreciated.