Skip Navigation

[Closed] can i display parent post depending if child-post field has been marked?

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Ross Fisher 8 years, 2 months ago.

Assisted by: Ross Fisher.

Author
Posts
#365391

I am trying to: display parent post in view loop according to a specific child-post's field. if the field has been check - the parent post could be in the loop.

#365433

Thank you for contacting Toolset support, I'd be delighted to assist!

1)
You can check your "Status" field value using wpv-conditional.
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

For example:

[wpv-conditional if="( $(wpcf-cost) eq '1' )"] yes [/wpv-conditional]

2)
To display parent field, Could you please refer to following articles from Views User Guide:
# Displaying Fields of Parent Pages:
=> https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/

To include a field from the parent post, you would use the following shortcode:

[types field="your-field-name" id="$yyyy"][/types]

Where:
$yyyy is the slug-name of the parent wit. For example: $your-parent-slug

It's not so much as rendering the complete parent post, but crafting your existing view to display the fields desired from the parent in the child loop. In this case, you can display the parent's fields conditionally depending on child field content using the wpv-conditional.

The topic ‘[Closed] can i display parent post depending if child-post field has been marked?’ is closed to new replies.