RE: the entries of my CPT are created by people with no knowledge of the admin so if there is no field allowing the selection of a directory entry, that’s a problem.
I see; sorry, it was not clear that the users adding the Entry shortcode would not have access to the directory admin pages. Honestly, I was assuming you were creating the CPT pages.
RE: Is there maybe a php function to get an entry with a specific email address?
Sorry, no, but perhaps there is something close.
Connections_Link::getLinkedEntry( $user );
The $user
parameter should be supplied as an instance of the WP_User
object.
It will return either false
on failure or an instance of the cnEntry
object. The false
means the WP_User
does not have a “linked” directory entry. The cnEntry
object would be the directory entry linked to the WP User.
RE: Could you also tell me more about the “link wordpress user” metabox which can be found on an entry edit screen?
Add a new WP User. Next, add a new Directory Entry. Start typing the new WP Users Username or Email. After three characters are typed, an autosuggestion list will be displayed. The autosuggestion will be WP Users who start with the characters entered into the field AND are not already linked to another directory entry.
I hope this helps; please let me know.