Skip Navigation

[Resolved] Related post type's custom field value does not show up in front end

This support ticket is created 3 years, 4 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
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: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Jamal 3 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#2171577
Screen Shot 2021-09-17 at 1.04.51 PM.png

I am trying to: I have linked a CPT (recipe) to WooCommerce product (multiple to multiple). In single view for recipe, I add a view for related product. In content selection, I set it to be product > recipe related to product. Added post title & custom field. Backend looks ok, but when I go to front end, custom field's value does not show up. You can watch my video explanation here and my screenshot: hidden link

Link to a page where the issue can be seen: hidden link

I expected to see: related post types' custom field show in front end

Instead, I got: custom field does not show in front end

#2171883

Hello and thank you for contacting Toolset support.

Do you want to display custom fields from the intermediary post type, or from the Recipe post type?

Can you try with a view that queries the intermediary post types, and then you can choose the Recipe post type fields from the dynamic source.

If this does not help, please allow me temporary access to your website. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2173105

Because you want to display the fields from the intermediary posts, the view MUST query the intermediary post type. And it also needs a query filter to get the intermediary posts related to the post where the view is shown. Check this screenshot hidden link

Then, you can add a Single Field block(or a different block) and choose the custom field from the intermediary post hidden link

I hope this answers your question. If I missed something, please give me an example of a Recipe post to test with it, and what are the values that it should return. This way, I can compare it with the existing and maybe use Ctrf+f to get the desired elements.

#2173819

Thanks! You answered my question. I got it working. Still trying to get familiar with new block view.

I got another question. I will put it here but if you need me to create a new thread, I can do so.
I've read this article: https://toolset.com/forums/topic/direct-search-results-to-another-page/#post-1296277
I chose only to display search form but I could not get the second dropdown option to show up. I want to show the result on another page (I plan to use Elmemtor to create a search result page).

My recipe archive page (elementor archive template): hidden link
Search result page (elementor page): hidden link

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/split-search-and-results-in-elementor/

#2174199

Awesome, I am glad I could help. Please mark this ticket as resolved.

I have created a new ticket to answer your last question. I'll be posting my reply there.