I have jobs that I made with toolset. Every job is related to an organization.
I have a search form for jobs that works fine
But when I show the individual page of a job I also want to show other jobs for that organization.
How can I do that?
Thanks
Hello and thank you for contacting Toolset support.
You will need to create a view, apart(somewhere else), that queries Jobs, and add a query filter on it. The query filter should be for related posts that are passed as a shortcode attribute.
Then, you can use this view, using a shortcode, and pass the related post using a shortcode argument. Something like:
[wpv-view name="Name or slug of the view" related="[wpv-post-id item='@relationship-slug.parent']"]
Does it make sense? If not, please allow me temporary access to your website and I'll prepare an example for you. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
First, the view needs to have the correct query filter, like this hidden link
I had to activate the query filter section from the screen options. Here hidden link
Then, we can pass the ID of the related post as a shortcode argument:
{!{wpv-view name='toon_vacaturesvan_huidige_organisatie' related="{!{wpv-post-id item='@organisatie.parent'}!}"}!}
Read more about the item attribute here https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
I wanted to check this, but I can't find the relationship meta box on one of the Vacature posts. So, I'll let you check from your side.
My issue is resolved now. Thank you!