Skip Navigation

[Resolved] parametric search with filter by parent attributes

This support ticket is created 7 years, 11 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.

Our next available supporter will start replying to tickets in about 3.08 hours from now. Thank you for your understanding.

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 18 replies, has 2 voices.

Last updated by Minesh 7 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#411614

Minesh

So I take it I can't achieve what I am after without taking a different approach.

I have an idea for a work around that I need some help to implement

"announcement" is a child CPT of "company-profile"

I have set up the CRED form for announcement to automatically select parent... (you get to the link to access the form from a Company profile post).

The code in the CRED form used to achieve this is as follows:

[cred-generic-field field="_wpcf_belongs_company-profile_id" type="hidden" class=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"[cred-post-parent get='id']"
}
[/cred-generic-field]

[cred_show_group if="($(_wpcf_belongs_company-profile_id) ne '' )"]
Company Name: [cred-post-parent get='title']

<div class="cred-field cred-field-_wpcf_belongs_company-profile_id">

</div>

Now I think I can take a similar approach to get the State selection from the Parent when the Child announcement is made... so that the values saved against the field "state" (of "company-profile' CPT) are saved against the Announcement CPT without the need to get the user to select state (or even see the selection of state) but I am unsure of how to achieve this. This will only work on new announcements but I can live with that.

Do I need to create a new custom field in the announcements CPT to save the state data into so that I can filter announcements?

Can you please help?

Cheers

Peter

#411810

Minesh
Supporter

Languages: English (English )

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

You mean to say - when user create new announcement using CRED form, you want to add state value as well to announcement that is auto pupulated just like you populated parent post id?

I think, yes, you can add new custom field that will store that parent "state" field value and prepopulate it with parent post state field value and later on you can filter your announcement by the state that is eventually a custom filed and you can filter your view by custom field easily.

#416484

Minesh

I have been busy addressing other matters so sorry for not getting back sooner. You are right..

I will do some experiments on this and get back to you. Please keep this support ticket open for now.

Peter

#416532

Minesh
Supporter

Languages: English (English )

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

Please note that ticket will automatically closed after 30 days and rather than stretching long thread I would suggest please open a new ticket,

Thank you for understanding.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.