I would like the user to be able to upload an image (profile picture) on the user registration form.
Then In the custom type content template I would like this image to be displayed if the user that creates the custom post wants to.
You have created a profile image custom user field, which is included in your registration form, yes?
When you say "the custom type content template", do you mean that you have created a custom post type for displaying user profiles? Which is linked to the user through the post author field of the post type displayed with the content template?
In which case I would expect the profile image to be a field belonging to the profile post, rather than to the user.
That would be straight forward to output in the template, but I guess you need another field (e.g. a checkbox) where the user specifies whether the profile image should be public or not.
In which case you could wrap the output of the image in a Conditional block, that tests this "public" checkbox.
No it's not a custom field. (If I understand correctly)
When a user registers:
he will have to fill the below fields
Email
Username
Password
Memorial Owner
First name
Last name
profile pic (image upload)
All of these are standard wordpress user fields as you know, besides the image upload
Now when the user creates a new custom post, In my case memorial.
I want to give him the option for his profile pic uploaded at registration - to be dispalyed somewhere I will choose on the content template.
So basically I need it to be a dynamic field I can access it from the content template.
A logged of user can register here: hidden link
At the bottom of the form there is a generic field where he can upload a profile picture.
After registration and log in hew can create a memorial here : hidden link
Then I would like to give him the option to add his profile pic to the memorial he creates. Even though he uploaded the image while being logged off at registration.
Here you can see an example of a memorial: hidden link
Basically what I want to do is to let the user upload a profile picture at registration and give him the option to add his profile pucture in the posts he creates.
> A logged of user can register here: hidden link
> At the bottom of the form there is a generic field where he can upload a profile picture.
- I see that this 'create account' page is using a Toolset User form. Instead of a generic field, you can register an image type user field for the profile picture, as shown in this screencast: hidden link
When you include this user field in this registration form a profile picture will be saved with the user's information.
> After registration and log in hew can create a memorial here : hidden link
> Then I would like to give him the option to add his profile pic to the memorial he creates. Even though he uploaded the image while being logged off at registration.
- Yes, for the custom fields for the memorial post type, you can include a new select type field 'Shop Profile Picture' with two options 'Yes' and 'No'.
In the post form on the 'create-pet-tribute' page, you'll include this 'yes/no' field, to record the user's choice.
And in the template for the single memorial page, you can include a conditional block that shows the profile picture through its shortcode below, only if the value of the 'yes/no' field is 'yes'.
So I created the field group : User Info
I added new field : image with slug :user-profile-picture
I was able to find it in the custom fields in the edit user form and it displays fine.
Then in an individual memorial I want to display it (first without condition just to see it works)
I added [types usermeta='user-profile-pic' title='%%TITLE%%' alt='%%ALT%%' size='full' user_is_author='true'][/types]