0

I'm creating a local site for my community. On this site we feature tutors in the area for hire. I'd like to have a section of the site where anyone can go and click on and see a list of tutors based on different criteria, like area or age group they teach. I'd like for the tutors to be able to login and edit their own page with their info or resume.

When someone views the tutor section, they will see a list of tutors, perhaps only preset snippets of info, they'll have to click on an action button to view the tutor's full profile page (the page that tutor created).

Is there some code to call user created content to a page? I'm looking for the answer to let a tutor make an account, sign in and edit their profile or page, and then I'll have to show snippets of that page on the front-end and link to the full page they made.

1

As you may or may not be aware WordPress provides a profile page in the admin for each registered user (including the admin of course!): `http://www.example.com/wp-admin/profile.php'

On that page you will see a number of fields that can be edited / customized including a Biographical Info field.

To fetch and output a field from this page for a particular user you can use the get_user_meta function like so:

$bio = get_user_meta( $user_id, $key );

$key could be the string description which corresponds to the Biographical Info field.

You may want to take a look at the get_user_meta Codex page (might be of special interest to output available data so you can correlate fields from the admin with valid $key values based on fields content).

  • Thank you for this response. When I get back to working on WP later today - I'll try your method and check out that Codex page. I'll mark answered or ask more questions if needed when I have a chance to work on it. – azitello Aug 12 '15 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.