Skip Navigation

[Closed] Displaying custom fields that aren't being recognised by Toolset

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

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 2 years, 7 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2451951
Screen Shot 2022-09-07 at 10.03.51 AM.png
Screen Shot 2022-09-07 at 10.02.45 AM (2).png

Hi there,

I'm running a marketplace plugin where the store name is stored as a user meta titled "marketking_store_name"

I'm trying to display products using toolset views, with the marketking_store_name value displayed as the creator of the product. As per my screenshot (the code is highlighted)

However, this is displaying nothing. There is definitely a value set in the db as per second screenshot.

Do you guys have an idea what I'm missing?

#2452073

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

According to the documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-user

The "wpcf- " prefix is used only for types created user fields.

So you need to try without the prefix, but please consider that the shortcode should be used inside a loop to be able to find the correct user.

Please read the documentation and the examples for more details.

Thanks.

#2452101
Screen Shot 2022-09-07 at 3.15.28 PM.png

Hi, sorry I should have said. I actually tried both, with wpcf and without.

Still nothing..

Here's the page the view is on: hidden link

The shortcode I am using: [wpv-user field='marketking_store_name'] in a loop with the attached filter.

#2452319

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

To make sure if the normal WordPress features can get the user at all, I suggest that you create a custom shortcode:

https://toolset.com/documentation/programmer-reference/adding-custom-code/how-to-create-a-custom-shortcode/

Then, use the get_user_meta native WordPress function to get the meta and see if it works or not:

https://developer.wordpress.org/reference/functions/get_user_meta/

If it works, you can use that custom shortcode instead of the wpv-user shortcode.

Thanks.

The topic ‘[Closed] Displaying custom fields that aren't being recognised by Toolset’ is closed to new replies.