Here is ONE solution, assuming that you are familiar with a code editor, a little bit PHP and be familiar with WordPress templates. Have a look at Advanced Custom Fields PRO (ACF)(https://www.advancedcustomfields.com). Install and activate the plugin. You will see a new item in the main menu of the CMS called “Custom Fields”
1. CMS > Pages > Create a new page called “Contacts”
2. CMS > Custom Fields > Create a Custom Field Group “Contacts”
3. Inside the new group, you can add following custom field:
– “Contacts” (choose ACF “repeater” field type)
Then, for the ACF repeater field, define following SUB fields:
– Name (a text field)
– Occupation (a text field)
– Company (a text field)
– E-mail (an email field)
– Phone Direct (a text field AND add some instructions like the desired format)
– Phone Mobile (a text field AND add some instructions like the desired format)
Tip : Set the Layout mode to be a “Row” (for most compact UI later on)
4. Assign the ACF custom field group to a page.
5. Save/Update your ACF field (blue button top right of the screen)
6. Back to CMS > Custom Fields > Field Groups > “Contacts”, at “Location” set a rule of when and where the ACF group should be visible, by making a selection from the dropdowns.
E.g. Show this field group if PAGE – IS EQUAL TO – Contacts
7. Create a template for your Contacts page, e.g. “page-contacts.php”
8. CMS > Pages > Contacts > Page attributes > Select the new template so that for the contact page your new template “page-contact.php” will be used
8. Open “page-contacts.php” in your code editor
9. Add the ACF code to display the ACF fields content: SEE the ACF website for which code you need to output ACF fields.
As for vCard format, that’s a matter of checking the microformat specs and applying them to the HTML markup + there are separate plugins available for vCard.
-
This reply was modified 6 years, 9 months ago by jorix.