[Resolved] Post relationships not showing on the front end
This support ticket is created 4 years, 8 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.
Tell us what you are trying to do?
I am trying to link horse offspring with their respective parents. I initially made some test posts and linked them and it worked, but subsequent posts are not showing up, even though I am able to connect them on the backend.
Is there any documentation that you are following?
I have looked through the support forum and watched online videos.
Is there a similar example that we can see?
No, but you can see the one example that is working, sort of, here: This shows one horse that I am able to connect, but any subsequent ones do not show up: hidden link
This one should show an offspring, but doesn't. Attached screenshot shows that I was able to link on the backend.
What is the link to your site?
rozearabs.wpengine.com
The website is a staging area so use the following credentials.
User: demo
Password: 3021a81ebbb1
Hello. Thank you for contacting the Toolset support.
First of all, I would like to know about your current relationship structure. What relationship you created ? Can you please share a screenshot of your edit relationship page?
- one-to-one
- one-to-many
- many-to-many
I can see with the screenshot - within the relationship box "Horses sale Horses Offspring", I can see one related post within the post-relationship box. Do you mean that you want to display that related post within the section "Offspring" on the following URL?
=> hidden link
If yes, it looks like you are using the view to display the related post, Can you please share edit screenshot of your view using which you are trying to display your related post?
The relationship is one to many. As one horse will have many offspring. I am able to successfully connect the horses, but the problem is they don't show up on the front end.
"Do you mean that you want to display that related post within the section "Offspring" on the following URL?
=> hidden link"
Yes, that is correct. However, even new horses that I have successfully added on the backend do not show up on the front end for the stallion. I made some tests posts and it worked, but when I went to add new horses, nothing showed up. The existing post on the stallion page is actually one of the test posts that worked, and I just updated the information.
Attached are screenshots showing the relationship and the view for the Horse/Sale Horse relationship.
I need to review on your site. Can you please share one test case post where you link the child posts and what posts you want to display exactly where.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
With the following view - at the Ordering section you set the order by value to Horse Name and there is not such field available with when I edit the horse entry: hidden link
=> hidden link
- So, I changed the ordering value to post date for now and I can see its working.
In addition to that - I checked the following template you created using the WPBakery Page Builder hidden link
You have added the conditional statement wrong way:
=> hidden link
The conditional statement should remain within the single text block - for example - the whole conditional statement should reside withing a single Text block.
[wpv-conditional if="( $(wpcf-video) ne '' )"]
{!{types field='video'}!}{!{/types}!}
[/wpv-conditional]
[php]
Also, I see with another conditional statement you added the conditional statement as given under;
[php]
[wpv-conditional if="( '[wpv-posts-found]' ne '' )"]
- The [wpv-posts-found] shortcode is depricated, you need to use the [wpv-items-found] but within view and outside the view's loop.
Please adjust the conditional shortcodes accordingly.
Thank you. I do have a question about the conditional statement though. If it is to only remain in the text block, how would one hide an entire section? Because just hiding the video makes it so there is a weird gap in the layout. I want to hide the entire row if there is no video.
I do have one other question. Is there a way to return results without using relationships between posts, for instance by using a specific field. For example, if I want to automatically return all offspring results for a particular dam by referring to the field "Dam" for each horse? Is there a way to set up a view like that?
New threads created by Minesh and linked to this one are listed below:
As your original issue is resolved with this ticket. I kindly ask you to mark resolve this ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery. Thank you for understanding.