Skip Navigation

[Resolved] Set a WP User to a CPT post.

This support ticket is created 6 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1151464

Tell us what you are trying to do?
My app will have Sales Reps as WP Users. I also have a CPT called Attorneys. As an Admin I need to assign a Sales Rep to an Attorney. I was hoping to assign them via a Post CRED Form, when creating a new Attorney I would select the Sales Rep user. But I do not have a reference to do that.
Is there any documentation that you are following?
I found this thread: https://toolset.com/forums/topic/how-to-link-a-custom-post-type-to-a-user-profile/
Inside this thread there is a mention of a link that provides example custom code to do what I want, but the link is "hidden Link". How can I get that link?

The above links was answered by Waqas so I was hopeing this ticket can be addressed by him.

Also why are support threads that are answered have "hidden link". Those can be helpful if they are not set to hidden. Only private links would make sense.

Is there a similar example that we can see?

What is the link to your site?

#1151768

Hi Mukesh,

Thank you for contacting us and I'll be happy to assist.

The thread that you referred to seems to be for a case slightly different than what you're looking for.

If you'll visit it ( https://wordpress.stackexchange.com/questions/34306/extra-profile-field-as-select-box ), while logged in as a Toolset member, you'll be able to access the hidden link.
( https://wordpress.stackexchange.com/questions/34306/extra-profile-field-as-select-box )

The suggestions from Waqas in that thread would be applicable, if you'll need to select a post to link to a user, on user's edit screen in the admin area.

Based on what you've shared a single Sales Rep (WP User) can be linked to multiple CPT Attorneys and you'd also like to enter that information through the CRED form, from the front-end.

In this case, a better approach would be to add a new select type custom field (e.g. "Sales Rep") for your CPT Attorneys and dynamically generate its select options using the "wpt_field_options" filter.

You'll find the more relevant example of code at this thread:
https://toolset.com/forums/topic/dynamic-select-options-for-cred-user-form-fields/#post-624490

Once your select fields options are dynamically populated from WordPress users, they'll be available in the admin area as well as on the front-end (in CRED form).

I hope this helps.

regards,
Waqar

#1153305

Hi Waqar, thanks for the information. I think I should be able to implement with your recommendation.

On the topic of hidden link - you said that if I am a Toolset member I should not see "hidden link" instead I should see the actual link? But In that post I put, I still saw the Hidden Link even though I was logged into website. Can you confirm I am the proper member?

#1153905

Hi Mukesh,

Thanks for writing back and glad that information helped.

I apologize for the confusion earlier and the way that link was included in that message, it is visible for the support team but not for the members.

This has nothing to do with your membership access specifically, which is fine.

regards,
Waqar

#1154420

My issue is resolved now. Thank you!