Don’t get overwhelmed with everything involved. Don’t worry, it’ll all work out. Focus on an immediate, small, achievable task. For example, just go with the ugly ?user_id=### URL parameter for now, pretty permalinks and rewrites can be added later.
Let’s get the user/company information first. You need a custom page template. The only requirements are that it resides in the theme folder and has a comment header that has a line that begins “Template Name: ” followed by a name.
On the template build a standard HTML form. The form method should be POST and the action attribute an empty value so the form submits to this same page. You can get the current user’s WP_User object with wp_get_current_user(). This object will contain some basic information about the user. Some of it can be presented as read-only information, like the login name, since no one can change it. Other fields are editable. Use the properties from this object to pre-populate form field values. Include hidden fields for security measures like verifying the user ID and a nonce value.
You can add in security measures later, but the form should not be presented to regular users until security is in place. For now, a line that verifies the current user is you is enough. Just call wp_die() if it’s anyone else.
You will be storing other values in user meta, or they already exist there. Get these values as well to pre-populate fields when they are available. Most of the page is displayed the same way regardless of whether it’s an initial GET request or after a POST submit. The one important distinction is POST request code needs to save the form data. This save the data section is managed as an if ('POST' == $_SERVER['REQUEST_METHOD'])
conditional. Within this block is all code to take data from the submitted form (in the array $_POST) and validate and sanitize it prior to saving it in the DB.
You’ll eventually need code to verify the user ID in $_POST matches the current user and that the passed nonce value is correct. If some users should not be able to edit their profile, then there needs to be a capability/role check as well.
To start with, maybe your form only has a few fields. If you can successfully present existing data in the few fields and save updated data upon submit, then it’s time to celebrate! Now it’s just a matter of adding in more fields and doing security checks.
Presenting a selected company profile to visitors is not that different than the profile form, except there are no form fields or POST requests. But you still get the saved data from the DB and output it in an organized manner. After the profile form, this page should be easy.
Which leaves us with the company listing page. It’s going to be much like a post archive template, except the query will be for users instead of posts.
Once you get these three pages working in a very rudimentary way, it’s just a matter of improving upon the basics, one step at a time. Don’t sweat all the little details involved, solutions exist. Just focus on the immediate goal you are dealing with, forget about the rest. Eventually, everything will come together ??