Hello,
I created a view with a category filter with radio buttons.
the default label is "tous", is there a solution so that it is not the default label that is select on loading page but the label "actif" as in the screenshot (in red) ? And is there a solution for change de dsiplay order of the label, i want to display the default label in second postion, after label 'actif' ?
Thanks for your collaboration.
Olivier Foguenne
In Toolset Custom Searches, you can manipulate exactly only what you see in the GUI "New Filter" or "Edit Filter".
Hence, if there are sort options, you can use them, but only them (unless you apply some sort of Custom Code).
If there are default value settings, you can use them as well, but only them (unless you apply custom code).
For each field type, the settings are a little different, although we try to unify them as much as possible.
Now, for Radio Fields, if you open the "New Filter" or "Edit Filter" GUI, you have the option to "use existing field values", or manually entered values.
If you choose manually entered values you can re-order the values as you like.
If you choose existing values, things will be less controllable.
You can label the first default option as you like, and if you do it with the manual values, you will be able to have the sequence you like.
Moreover, you have asc/desc (this is alphabetical) ordering, in the Filter.
I attached a screenshot of the possibilities.
Hi Beda,
I don't have the same presentation as you (see the screenshot).
Moreover, when I sort, I lose alphabetical sorting by post titles. What should I do to keep ordering alphabetic posts ?
Thanks for your help
Olivier
You mentioned you want radio buttons but now it seems you want drop-down fields?
Moreover, I do not think that is a Custom Field.
It rather seems a taxonomy?
There you cannot use that feature, as it exists not for taxonomies but only fields.
I think you will need to change the setup and use a Custom Field instead of a Taxonomy, if you require the custom values feature.
Yes, it is custom taxonomy, with a sort by radio button. I just want that when I get on the page this is the "active" taxonomy that is selected.
And I also want to keep the display in alphabetical order when sorting, which is not the case at the moment (see screenshot).
Here is the page in question : hidden link
Than you
Olivier
OK, since this is a taxonomy search you cannot proceed like instructed earlier, since there is no native feature for the goal you try to achieve.
What you can do is this:
- create the View as usual
- wherever you link to this View, please edit the Link and add the URL parameter to the first option checked is set already, when the visitor visits the page with this View:
<em><u>hidden link</u></em>
Please adapt the "?wpv-category=one" part.
"wpv-category" will be the URL parameter as seen in the View Query Filter Settings, and "one" is the exact term slug you want to use as default.
This also keeps the order you choose when inserting the Custom Filter ShortCode.
ok, i understood, how can i display in alphabetical order. When I load the page the sort is good but when I click on a button the order disappears.
Are we talking about the order of posts or the order of the terms in the search?
If this is about the search:
- please edit the custom filter shortcode
- find the order by settings as shown in the screenshot
if this is about the order by in the posts list itself, it's not related to this ticket here.
In that case, we are happy to assist this in a new ticket.
It's about the order of the posts.