Skip Navigation

[Closed] Custom Search A-Z filter

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by Christian Cox 3 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1655527

Tell us what you are trying to do?

Hello, I'm using your great Toolset platform and now I have my client's request to build a content filter (with A-Z filtering included). I would like to know if there is a way how to make it with Toolset. I already know how to make a Custom Search, but I need to know how to make in my client's requested design.

Here is the content structure:

Sezóna (Season): 2015, 2016, 2017, 2018, 2019, 2020 ....

Závod (Race category): Rally, Autocross, AER, Crosscountry etc.

Jezdec (Racer's Name): Jan Novák, John Smith, Martin Vopálka, Robert Smith.... etc.

Tým (Team): M Racing, ESV Racing, Zentiva Racing etc.

So here is an example of some post's structure: Season: 2019, Závod: Autocross, Jezdec: Martin Vopálka, Tým: ESV Racing

THE MAIN PROBLEM: I need to create a Custom Search filter which is going to list the (Custom Posts) articles also with using A-Z LISTING. Here is the general view:
hidden link

And here is an example of using the same filter by searching through the structure:
hidden link

Is there any documentation that you are following?

I'm trying to follow this documentation but I'm not sure how to deal with it in my case: https://toolset.com/forums/topic/a-z-filter-glossary/

Please let me know how to make it. I already know how to build all the other features with Toolset but this issue is too complicated for me.

Many thanks, best,
Jiri.

#1656289

Hello, it may or may not be possible to achieve this in Views, it's going to depend on your design's flexibility, how the content is organized, and your skill level with custom HTML, CSS and JavaScript. If you're flexible in what you want to achieve, I can show you what is possible.

First of all I want to point out that customization support for Views filters is extremely limited, since there is no JavaScript API for Views filters. Support is generally limited to the types of filter inputs offered by the system. For example, there is no "text link" filter in Views. The filter options you have shown in black text with orange background cannot be achieved simply in Views - they look like plain text. That type of filter simply does not exist. Checkboxes, radio buttons, select fields, and text input filters are possible, but not text links. I also see "Manual typing filtering..." in an input box in your mockups. My guess is you want to be able to type here and have the corresponding filter options appear above as you type. There's nothing like this available in Views filters, and no APIs available to support it as a custom feature. Only one autosuggest filter is available for search, and it is exclusively for location searches (searching by address). The design of this field is dictated by the Maps API you choose to implement (Google vs. Azure)

So those are a few of the things I wanted to point out that cannot be accomplished.

Other tickets on the site show how you can create a glossary of posts by first letter, using a custom taxonomy containing a single term for each letter of the alphabet. Basically you assign the first-letter term to each post. So for example, let's say your post title is "Test post 1". You would assign the term "t" from the custom taxonomy to this post. Then when you select the term "T" in the View's filters, the post "Test post 1" will appear in the results. https://toolset.com/forums/topic/create-a-glossary-a-b-c/

However, what is not possible is to create an A-Z filter of custom field values. The A-Z filter explained there is exclusively for post titles. Your case seems to be more complex but I'm not clear how all the content is related. Can you explain what post types will be shown in the results? What are "Racers names" and "Team names" - are Racers and Teams separate custom post types in a post relationship with the result post type? Are they custom field values? Are they taxonomies associated with the custom post type shown in the View results?

#1656293

Hello,
thanks you for your reply,

"Can you explain what post types will be shown in the results? What are "Racers names" and "Team names" - are Racers and Teams separate custom post types in a post relationship with the result post type? Are they custom field values? Are they taxonomies associated with the custom post type shown in the View results?"

"Racer names" and "Team names" are taxonomies, "Season" and "Race category" are categories. Well, I don't know how this explanation will change the solution of this problem.
Please let me know.

Thanks, best.
Jiri

#1657091

Okay so each of these search filters is a taxonomy filter in some way. I don't know of an easy way to create a glossary of term filters using the first letter of the term, so I think the overall answer here is most of what you want to achieve in this design isn't really supported or possible with Views. I can show you the types of taxonomy term filters that are possible in Views, so depending on the flexibility of the design you may or may not be able to achieve something with the same end result - which is filtering a View of posts by multiple taxonomy terms. The method of filtering will not be identical to the design requirements here. Let me know if you'd like to continue investigating that.

#1658023

Hello, OK,
thanks for your explanation and an offer, during this weekend I will talk to my client and we will clear the structure and the details and needs of this searching/filtering. Then I will let you know.

Thanks again,
Jiri.

#1658721

That sounds fine, I'll stand by for your update.

#1667923

Hello,
I was talking to my client and we made some halfway. So please show me these types of taxonomy filters, as you requested previously, and I can use it in the project.
Thank you!

#1668783
classic-editor-filter.png
block-editor-filter.png

If you're creating a custom search View using the Block Editor, you can click "Add search filter" to add taxonomy filters. If you're using the Classic Views editor, you can click the "New Filter" button above the "Search and Pagination" panel editor in the View editor screen to insert and configure a taxonomy filter. If the "Search and Pagination" panel is not visible, scroll to the top right corner of the screen and click "Screen Options" to activate the panel. See the screenshots here for details about inserting a filter.

After you click "Add search filter" or "New Filter" button, you can select a custom taxonomy and configure a custom search filter for that taxonomy. In the Block Editor, the configurations will be in the right column. In the classic editor, you will choose the configurations in a popup screen. You can choose whether you want to display the filter as a group of checkboxes, a select field, or a radio button, for example. You can also choose the sort order for the term options. The system will generate the filter for you automatically based on the configurations you choose.

The topic ‘[Closed] Custom Search A-Z filter’ is closed to new replies.