Skip Navigation

[Resolved] Building range slider with Likert Scale; Taxonomy

This support ticket is created 4 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
- 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 3 replies, has 2 voices.

Last updated by Minesh 4 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2208155
Screenshot 2021-10-28 at 11.33.28 PM.png

Tell us what you are trying to do?
1. Range Slider: I would like to build a range slider in the Custom Search builder. It is based on a custom field (radio) with 5 points. Like the Likert Scale, it goes: Very Poor, Poor, Average, Good, Very Good. I want to build this instead of using a dropdown or other options. Is it possible to build?

2. Taxonomy: Is it possible to choose only some items from Tags to display, instead of everything displaying when I select Tags in "Add Search Field"? So for example, I have 5 tags: A, B, C, D, E. I want only A and B displaying in a field in the Custom Search builder.

Some goes to Categories, it is possible to just select some Categories to display in a field?

Is there any documentation that you are following?
I can't find any info

Is there a similar example that we can see?
See image attached

What is the link to your site?

#2208603

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As you already aware that range filter is possible with using minimum value and maximum value input boxes as you can see with one of our reference site here for price field: hidden link

There is no such native feature available to implement the range slider with Toolset and there is no simple way to implement it. It will require lots of custom code, including knowledge of advanced jQuery and HTML and CSS customizations.

To implement such feature really needs significant customization with HTML, CSS, jQuery, PHP and Toolset hooks and to support such custom edits is beyond the scope of our support policy: https://toolset.com/toolset-support-policy/

As a supporter, we need to work within the defined support boundaries, as a result, I do not have any solution to offer you here.

I've two things to offer here, either contact our certified partners for such custom code.
=> https://toolset.com/contractors/

#2208821

What about Question 2?

2. Taxonomy: Is it possible to choose only some items from Tags to display, instead of everything displaying when I select Tags in "Add Search Field"? So for example, I have 5 tags: A, B, C, D, E. I want only A and B displaying in a field in the Custom Search builder.

#2209751

Minesh
Supporter

Languages: English (English )

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

2. Taxonomy: Is it possible to choose only some items from Tags to display, instead of everything displaying when I select Tags in "Add Search Field"? So for example, I have 5 tags: A, B, C, D, E. I want only A and B displaying in a field in the Custom Search builder.
==>
Toolset offers the filer "wpv_filter_taxonomy_frontend_search_get_terms_args" which you can use to control what terms should be included or excluded.

For example - you can add the following code to "Custom Code" section offered by Toolset:
=> https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/

add_filter( 'wpv_filter_taxonomy_frontend_search_get_terms_args', 'ts_mod_tax_filter', 10, 3 );
function ts_mod_tax_filter( $args, $tax, $view_id ){
 
    if ( $view_id == 99999   &&    $tax=='post_tag' ){
 
        $args['exclude'] = array( 1, 2, 3 ); // Edit array of term IDs to exclude
    }
 
    return $args;
}

Where:
- Replace 99999 with your original view ID
- Replace post_tag (the taxonomy slug) if required