Skip Navigation

[Resolved] adding custom class to wpv-sort-orderby not working

This support ticket is created 6 years, 7 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#919626

I am trying to add bootstrap class "custom-select custom-select-lg" to wpv-sort-orderby this way but not working:

[wpv-sort-orderby type="select" options="post_date,field-total_sales,field-views_woo_price" label_for_post_date="newest first" label_for_field-total_sales="bestseller" label_for_field-views_woo_price="low to high" orderby_as_numeric_for="field-total_sales,field-views_woo_price" orderby_ascending_for="field-views_woo_price" orderby_descending_for="post_date,field-total_sales" class="custom-select custom-select-lg"]

I tried also to add attribute "list_style="custom-select custom-select-lg". Not working too.

[wpv-sort-orderby list_style="custom-select custom-select-lg" type="select" options="post_date,field-total_sales,field-views_woo_price" label_for_post_date="newest first" label_for_field-total_sales="bestseller" label_for_field-views_woo_price="low to high" orderby_as_numeric_for="field-total_sales,field-views_woo_price" orderby_ascending_for="field-views_woo_price" orderby_descending_for="post_date,field-total_sales" class="custom-select custom-select-lg"]

It works only this way when i add this in the CSS Editor which i dont prefer.

select.wpv-sort-control-select {
    height: 37px;
    width: 100%;
    background: white;
    border: solid 1px #CED4DA;
}

how to add class to wpv-sort-orderby ?

#919760
list_style.JPG

Hello,

The attribute "list_style" works only when using option "as a dropdown list", see screenshot list_style.JPG.

There isn't such a built-in feature to add custom CSS class to the select dropdown of shortcode [wpv-sort-orderby], but you can follow our document to style it:
https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/#how-to-style-the-sorting-controls
section "How to style the sorting controls"

#920001

Thanks Luo!

#920104

You are welcome