Home›Toolset Professional Support›[Resolved] Split: How do find short-code for data from custom fields – how to display all custom field from child post
[Resolved] Split: How do find short-code for data from custom fields – how to display all custom field from child post
This support ticket is created 4 years, 5 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.
I tried your code with the output='raw' option and it seemed to work fine.. should I still use it?
Also only one of the child is displayed.. please advise how I can display all the children's custom fields?
Just to give you an example.. I have One Organisation (parent) with multiple Brands (children) and I need to send an URL from the Parent's page with all the brand ids of the children... please help.
I would like to know, you want to display all custom field belongs to your single child post OR you want to display all child posts custom fields.
The first question seems to be you want to display all custom field belongs to your single child post
If I understand right you are assuming that I have a single child post with multiple custom-fields and would I want to display ONE CHILD POST and ALL it's custom fields... The answer is NO..:-).. this is not the user-case scenario
OR
you want to display all child posts custom fields.
If I understand this right then I think you have understood that I have multiple child posts (single parent - multiple children).. yes, that's right.. and then I was confused with the second part of your question.. so let me clarify.. each of my child-post has a custom field that holds their brand-id.. so it's a single custom field in EACH of these CHILD POSTS and I would like to display in the URL this collection of brand-ids ...
I hope I have been able to make it clearer...:-).. Please do let me know if you need any more clarification..
However I am not sure how this should be displayed in the URL.. I am assuming it should be hidden link
I am assuming that these ids should be separated by commas..
Anyways please do advise how I can achieve this result.
you want to display all child posts custom fields.
If I understand this right then I think you have understood that I have multiple child posts (single parent - multiple children).. yes, that's right.. and then I was confused with the second part of your question.. so let me clarify.. each of my child-post has a custom field that holds their brand-id.. so it's a single custom field in EACH of these CHILD POSTS and I would like to display in the URL this collection of brand-ids ...
==>
Yes, this is what I mean, if you want to query multiple children of single parent posts, you need to create a view and add a query filter for your post-relationship to filter your posts based on your single parent.
I am aware of how to display the multiple children of a single parent and I have already managed this in my view.. but my query is how to get this data of a specific custom field in a shortcode and loop through this with a comma as a separator.
I would appreciate some hand-holding on this... as it's a bit urgent and the time difference (I am at GMT +8.00) is making it a bit difficult for me..
Also please do advise, If I will have to use Classic Editor View for this? I would prefer not having to use it but if it's really necessary please do advise.
On the right side where you see the Brands under 'My Eyewear Brands' are the view I have created and am displaying the IMAGE in the Loop. I think it's easy to be able to show the Brand ID there as well.. but I need the brand IDs on the left side where I have the Eye Savers Logo and in the text below the logo...
I would like to be able to display it in custom html format... so maybe add it in the link ( href tag ) and in the text to get a faster view..
I've created the following view using classic view to generate the comma-separated view:
=> hidden link
Then I've added the "field and Text" block and switch to HTML mode and added the above view to your optician's single post content template:
=> hidden link