Hi,
I’m not sure I’m following you…
Do you want to display the posts of the current user? Then you can user this code…
[loop type=custom-post-type author=this]
[field title]
[field custom-field]
[field custom-field1]
[field custom-field2]
[field custom-field3]
[/loop]
Or is the name of the user in the custom field another user then the author of the post?
This code will display the post where the value in the custom field is equal to the display name (selected in the combo box of the user profile) of the user who is logged in.
[pass user_field=fullname]
[loop type=custom-post-type field=name-of-the-field value='{USER_FIELD}']
[field title]
[field custom-field]
[field custom-field1]
[field custom-field2]
[field custom-field3]
[/loop]
[/pass]
Keep in mind that the user can change his own display name, then it will not match the custom field anymore. Using the username for this is more solid…
Peter
By the way: I’m not “Support”, but just a all day user of this excellent plugin.
Thread Starter
Mosche
(@mosche)
Hi Peter,
First of all, thank you! The second one is the one I was looking for and it works like a charm. And especially thanks for the speed of the support.
Secondly, that is an excellent solution. I was not aware of the [pass] option.
Thirdly, after your clarification I realized I meant the login name. The one that cannot be changed. The display name can be changed, so I’m better off using the login name instead. Since there is no guarantee that the user might accidentally change that.
I used the code and substituted “fullname” with “name” in the first line and it works like a charm.
Fourthly, this is an awesome plugin.
Regards,
Mosche