Tell us what you are trying to do? Display parent data on a child post
Is there any documentation that you are following?
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
Is there a similar example that we can see?
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
What is the link to your site?
versteckter Link
On the child content template i sue:
[types field='client-first-name' item='@client-client-portfolio.parent'][/types]
however the parent content is not displayed.
I do see the the child is connected to the parent in the child edit mode in the admin back-end.
please advise,
David
I noticed that when i'm viewing the custom post as an Admin i can see the Parent Data in the child however when i'm a subscriber the data does not show.
please note that the end user create his own private posts. i assume he can see data from private parent and child post he created.
I used:
[wpv-view name="client-portfolios" item="@client-client-portfolio.parent"]
in the parent content template and i can see the list of children in the parent post as an admin user. however i can not see the list as subscriber who created the parent and child posts
Hello,
I assume we are talking about this case
- one-to-many relationship between post types "client" and "client-portfolio"
- custom field "client-first-name" in post type "client"
- Use an subscriber user to create private posts: "client" post and related "client-portfolio" posts
- in a single "client-portfolio" post, display parent "client" post information:
[types field='client-first-name' item='@client-client-portfolio.parent'][/types]
I have tried above settings in my localhost with a fresh wordpress installation, it works fine.
Please check these:
1) Upgrade to the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017, and test again
3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I can see the problem, since the "Clients" posts are setup as "Private" status, but by default the Toolset post type relationship API doesn't return private posts, so it conduct the problem you mentioned above, in your case, I suggest you try to use filter hook "toolset_get_available_post_statuses" to allow private posts, for example:
1) Make sure you are using the latest version of Toolset plugins
2) Add below codes into your theme file "functions.php":
add_filter('toolset_get_available_post_statuses', function($statuses){
$statuses[] = 'private';
return $statuses;
});
My issue is resolved now. Thank you!