Skip Navigation

[Resolved] Help with setting up custom filterable search

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here is that the user wanted to filter their taxonomies with a parametric search

Solution:
Unfortunately its is not possible to create a parametric search for taxonomies

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

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 10 replies, has 2 voices.

Last updated by Shane 6 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1130823

Tell us what you are trying to do?

Add parametric search - no matter what I do - this returns all results for a taxonomy ( groups ). The best way is to log in.

Take a look at the following view "test view"

A previous ticket helped me on the

In a previous ticket Shane directed me how to solve my problem of showing a view on the home page - this works!

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

hidden link

credentials shown previously

#1132037

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Steve,

Sorry for the delayed response.

Could you let me know what exactly this view should be displaying.

I see you set it to display a Agenda minutes and Agenda groups repeatable field groups.

I think you should separate these in different views but please let me know what exactly you want this view to display.

Thanks,
Shane

#1132046

Hey Shane,

No worries with response - I am so close to getting this done - just need the parametric search to be done.

If you login into the site ( I can give you credentials if needed )

You will find "test view" which I have been working on.

1) Post view - Agenda Minutes
2) Using RPG Agenda Groups
3) Search and Pagination looks like this

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
<label>[wpml-string context="wpv-views"]Groups[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="group" type="select" default_label="All" orderby="term_group" url_param="wpv-group"]
</div>
[/wpv-filter-controls]
[wpv-filter-end]

4) Loop Wizard looks like this

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="1" pad="true">
[wpv-item index=1]
<div class=" ">
<div class="col-sm-12">[wpv-post-body view_template="Loop item in test view"]</div>
[wpv-item index=other]
<div class="col-sm-12">[wpv-post-body view_template="Loop item in test view"]</div>
[wpv-item index=pad]
<div class="col-sm-12"></div>
[wpv-item index=pad-last]
<div class="col-sm-12"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

5) Templates for this view, looks like this

<h5> Berry </h5>
[wpv-view name="agenda-minutes-reports-berry" limit=1]
<h5> Black Earth EMS </h5>
[wpv-view name="agenda-minutes-reports-black-earth-ems" limit=1]
<h5> Cross Plains / Berry EMS</h5>
[wpv-view name="agenda-minutes-reports-cross-plains-berry-ems" limit=1]
<h5> Cross Plains EMS</h5>
[wpv-view name="agenda-minutes-reports-cross-plains-ems" limit=1]
<h5> District1 EMS</h5>
[wpv-view name="agenda-minutes-reports-district-1-ems" limit=1]
<h5> Park Planning</h5>
[wpv-view name="agenda-minutes-reports-park" limit=1]
<h5> Planning Board</h5>
[wpv-view name="agenda-minutes-reports-planning" limit=1]
<h5> Roads Board</h5>
[wpv-view name="agenda-minutes-reports-roads" limit=1]

6) Test Page for this test view can be found here

hidden link

Result is unstyled ( forget about that ) - but here you will see the views - the views all return the latest agenda / minutes ( if available ) - good.

Parametric shows parameters - "Groups" - good.

But they do no not filter properly - when selected, they show ALL results

Your point about creating multiple views for each set of agendas / minutes has already been setup.

So, perhaps, if you login, this will make more sense.

#1132098

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Steve,

I understand this.

What I was thinking, so how the parametric search works is that you filter by an attribute on the posts itself.

Right now your search won't work as intended.

Let us start small. Lets clean up this view.

This parametric search view, its primary function is to filter the Agenda Minutes, correct?

Its because of how this is setup why the search isn't working. So starting from the top down is a good idea. Lets work from it there.

Thanks,
Shane

#1132107

Understood - and yes, the parametric search sole purpose is to filter ...

What do you suggest we do?

#1132139

Shane,

As an FYI - each post has a group - this is the attribute I am trying to filter on ...

#1132181

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Steve,

Also from what i've already seen you want the items to be sorted by their groups.

Now this is going to be difficult to do with your current requirements as each group will be repeated for as much posts that are applied to the same group.

Example if 2 posts are assigned to the group Berry ,

Then the view will list.

Berry
- Post

Berry
- Post

But what you want is

Berry
- Post 1
- Post 2

And the filters to apply on the posts, which is not possible to achieve.

Thanks,
Shane

#1132186

Shane,

I kinda came to the same conclusion - but I just want to make sure I understand.

When we talk about CPT Berry - there will be just one post, but have multiple RFG instances ... Is this what you mean?

Berry Post.
- RFG 1
- RFG 2

I understand that a view could be viewed as piece of SQL - and what I am trying to achieve are correlated sub queries using the views.

It's not critical that I have a filter by Group by Post by RFG ... But dang it would be sweet to achieve!

I bet that I could write a correlated sub query to achieve this - just not by using the view.

Do I understand you correctly?

#1132238

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Steve,

Not exactly.

Currently from what I see you are using a taxonomy to separate the type of posts.

So when I say Berry I meant the Taxonomy Berry that has the posts attached to it.

You can still filter by the group. But its just having the names over each would be a problem with the search.

An organisation like this below would be possible with Nested views.
Berry
- Post 1
- Post 2
Black Earth EMS
- Post 3
- Post 4

But not with the search. With the search it would be like this.
Berry
- Post

Berry
- Post

The main reason is because the first view would need to be a taxonomy view and currently you're not able to do a parametric search on a taxonomy view.

Not sure if i'm getting this clearly over to you but if there is any confusion you can let me know.

Thanks,
Shane

#1132288

Shane,

Understood - perhaps make a request for a parametric filter with a Taxonomy view ( which I also created to see if it would work ).

Ok,

You may close ...

#1132764

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Steve,

I'm sorry i couldn't be much more help with this one for you.

Thanks,
Shane