Glad to hear you figure out a solution!
Here are a few links that may help you in the future. They explain how to create custom override template files as well as custom CSS/JS files that will load in addition to the core files automatically if found. Using these methods are update safe and depending on the changes a bit easier to implement than trying to create a whole custom template.
- Custom CSS for the core Connections plugin.
- Custom CSS/JS for the templates.
- Custom template override files.
Can you share a link to your directory page? I’d love to see it.
Also, if you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!