Skip Navigation

[Waiting for user confirmation] Filtering parent with child taxonomy

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 0 replies, has 1 voice.

Last updated by Minesh 6 hours, 50 minutes ago.

Assisted by: Minesh.

Author
Posts
#2803906

Hi,

I know what I'm looking for has been already discussed here but I'm afraid I cannot get a way to make it work.

This seems to be what I want but I couldn't get it to work: https://toolset.com/documentation/legacy-features/views-plugin/displaying-related-child-posts/

This one looks good but the explanation is too short and Demo sites are discontinued: https://toolset.com/lesson-placement/lesson-placements-1824625-1727273/

Basically, I want to filter Parent post using Child taxonomy.

Here is what I'm trying to achieve:

Parent: Organisation
Child: Jobs
Child taxonomy: types of jobs (cooking, driving, etc)

In a view displaying Organisations with their related jobs, how can I filter only organisations which have "cooking" jobs?

Any help would be truly appreciated.

Many thx

#2803923

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I woudld like to know you set your view to query what post type - Organization or Jobs?

Also, how you want to display the parent taxonomy filter - as select dropdown?

If you can share admin access details and problem URL once I review your current structue I will be able to guide you in the right direciton.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2804054

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Where you added your view on what page and what view you created?

#2804095

Oh I'm sorry, I didn't provide all the info.

The page is: hidden link

The organisation view: hidden link

The nested jobs view: hidden link

BTW I tried to achieve it using blocks, with no more luck.

Thx again

#2804330

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you added two taxonomy filters where one taxonomy (filter) is attached to organization post type and another taxonomy (filter) is attached to Jobs post type.

Do you want to keep both taxonomy fitlers "Sector of Activities" and "Type of Jobs"?

#2804355

Hi Minesh,

Yes absolutely, I wish to keep both.

In fact, I will need many more filters (age, language, availability, etc), some for Jobs, some for organisations.

Thx for all

#2804360

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Actually, you can create a custom search view and add the filters for the custom fields, taxonomies for the post type you set to query.

To filter parent/child posts using the same view is not recommended because you can not add the parent frontend filters to the child view or viceaversa.

If you set your view to query "job" post type, then you can add filters using custom fields and taxonomy that are belongs to post type "job". But this will give you luxury to display related parent informtion for every job post as you have one-to-many post relationship with organizations and jobs post type.

#2804361

OK, i get I could have a view displaying filtered jobs and each job could display its parent info.

That's good.

Is there a way I can display all the jobs related to an organisation and the organisation info only once?

Like that:

Job 1 name (related to organisation 1)
Job 2 name (related to organisation 1)
Job 3 name (related to organisation 1)
Organisation 1 name

Many thx

#2804470

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - but the catch here is that if you set your view to query post type "Jobs" then you can able to add custom search filter using custom fields and taxonomy belongs to post type "jobs". you will not be able to add search filters for custom fields and taxonomy for post type organizations.

I hope this is fine?