Skip Navigation

[Resolved] Using ACF Relationship Fields in View

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

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#551506

I am trying to create a view where I can filter custom posts by a related post. In this case, it's a post I'm relating to a Woocommerce product.

I have an ACF relational (Post Object) field assigned to my post, so I can select the related product. In my view, when I add that filter, though, I only see the ID number for the product.

Is there a way to get the product name?

Here's the field in the View:

[wpv-control-postmeta field="td_product_name" type="select" default_label="PRODUCT NAME" url_param="wpv-td_product_name"]
#551569

Well, Views will allow you to use Custom Values, Stored values or labels, if the Field was created with Types.

This Field is not from Types, hence we do not know what it is, how it's built and what it holds.
It seems to hold simply and only the Post ID. And that is what Views will return to you.

There is no method to get the Post Object and from there, other Post Data in the Views GUI for Custom Searches.
You would custom programming work which is beyond the scope of our support.

At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/

You will get the custom assistance you need to get on with your project.

For a list of availalbe Attributes see here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-postmeta

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.