Tell us what you are trying to do? I have a post type called Alumni. There is a relationship between this post type and another post type called Thesis Work. An Alumni may be connected to zero or more Thesis Works. I'd like to show some content—specifically, a subheader named "Thesis Works"—if there is at least one Thesis Work connected to the Alumni whose page is being viewed. I've attached a screenshot of the Layout work-in-progress. Right now, the subheader "Thesis Works" appears whether or not there are Thesis Work post types connected to the given Alumni. See the URL below for front-end view.
Is there a way to conditionally display a piece of information based on the presence of a post relationship? I didn't see a way to do this through the Conditional Output dialog.
Is there any documentation that you are following? No.
So I tried this snippet of code, and it didn't work as expected. I think the issue is that the code is checking for a post ID of a parent post. But I'm *viewing* the parent post. What I want to do is check for the presence of any *child* posts.
Can we replace "parent" with "child" in your snippet, per below?
[wpv-conditional if="( '[wpv-post-id item="@relationship-slug.child"]' ne '' )"]
parent exists
[/wpv-conditional]
I'm working in the "Template for Students Layout" at hidden link. An example page on the front-end is hidden link.
your original query is to check the parent post exists or not. Could you please open a new ticket with your each new question. This will help users searching on the forum and help us to write the resolve ticket summery to the correct issue which is raised with your original question.
OK, will do. My apologies for not following proper protocol. I'll open a new ticket for each new question going forward; I'd been afraid to separate issues that were so closely related.