Skip Navigation

[Resolved] Add link to Profile post in menu

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by Nigel 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1169029

Hi Christian,
so, I decided to use the post author image instead of the post featured image.
Now, in the post, I have changed it, and it is visible the post author image.
After I will "migrate" the gallery custom field from the CPT to User, and I will create new user Form, called add photos, where the user can upload the user image and the photos for the gallery.
I think that solution is the best solution to apply in my case.

What I need to know now is how I can add in menu the link to open the own Profile CPT post for every user that have create a Profile.

#1169515

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I haven't followed what you have been working on with Christian, but if you have created profile posts that are linked to users (presumably they are authors of the posts) then the expected way to link users to their profile is not to link them directly to the profile post URL, but to create a static page "my profile" and insert a View on that page which will display the profile post.

The View simply needs a Query Filter for the post author to be the logged in user to select the correct profile post to display.

Your menu then includes a link to that static post.

Some of this is covered in the following post which may help: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

#1169821

Hi Nigel,
the solution that you have written I think is a good solution to do what I need, but I have other question about this solution and other function that I have implemented in this site.

So, in the site I have implemented the Favorite function, using this guide https://toolset.com/forums/topic/add-post-to-a-favorite-list/#post-459894 where a user can add or cancel to favorite a profile.
Now, with your solution to display the User Profile link to menu, using a simple page displaying the content with a View, what are the [wpv-user field='ID'] and [wpv-post-id id="$current_page] values that are saved into the Favorite CPT single post?

#1170509

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hang on.

Using a View to create a My Account page is intended to display the profile of the current user (the registered site visitor).

If you are talking about favouriting profiles then it looks like you want people to be able to see each other's profiles, and the set up I described would mean that people always see their own profile when they visit such a page.

That isn't what you intend, or is it? Surely people would not be favouriting their own profile?

#1170535

Hi Nigel,
no, it isn't that.

So, in the Profile CPT post I have added the functionality to add or delete one other user profile, different from the current user Profile CPT post, to the Favorite CPT.
So, if I using a View into a My Account page, this page display only the current user Profile CPT post? Yes?
When I display other user Profile CPT post, are them not displayed into the same My Account page but in the "normal mode" directly from the relative Profile CPT post?
Because if the other Profile are visitable from the relative Profile CPT post, your solution is perfect and the Add to Favorite function work perfecly.
But I'm thinking that it is, and in the previous reply I don't have hunderstand correctly.

#1170643

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Francesco

Sorry that I am having difficulty understanding how you want this to work.

If user#1 is logged in and viewing the site on the front end.

He can visit his own profile. Does he also see anyone else's profile (e.g. the name) when looking at his own profile page, and can favourite these other profiles directly from his own profile page?

Or does he need to leave his profile and visit the profiles of other users, and when he is looking at their profile page that is where he can favourite their profile?