You have multiple options. there is not single correct way to do this, but some options may be better for you depending on your situation:
1. A page called Contacts
Just create a page, call it contacts, and put your contacts in the page content. Your html is made of paragraphs and header tags, all of which are usable in page content
2. Customizer
You could add a short code that displays a value you saved from the customizer. But this is overcomplicating things, and I would not recommend this
3. Custom Post Types
You could create a contacts
post type, which would give you an archive at /contacts
that you can display contacts on. Each contacts
post would be an individual contact with a header and content/address/etc This would give you a backend interface too, and you can use archive-contacts.php
in your theme.
Unless you have more than 9 or 10 contacts, this may be overkill, and you might find creating a page a lot faster/easier
4. User Meta
If your contacts are also WordPress users, you can add fields to the user edit profile page, so that they can fill out their contact details. Add a checkbox indicating if they should be shown on the frontend, and use WP_User_Query
to retrieve all the users who set that checkbox and list them. You’ll want to implement a shortcode or a page template to put your user query in.
If you do this, you’ll need to figure out how to add user fields, how to create shortcodes, and how to do user meta queries with WP_User_Query
. This would be the hardest option