Skip Navigation

[Resolved] Making a view work

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

Problem:

Change the default option title of relationship filter.

Solution:
You can use attribute "default_label" to shortcode [wpv-control-post-ancestor] to customize the text "Please select", for example:

[wpv-control-post-ancestor ... default_label="--- select one ---"]

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-ancestor

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

Last updated by kerimF 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1310959

I'm running into a problem concerning my view. I'm trying to create a filter for the view "new search 3", that displays the trainers of the events. In every event, I created a post relationship link between trainers and the events. I want the drop down filter to display the trainers. The page on which the search bar is displayed is: hidden link. So what I added is this:

[wpv-control-post-relationship ancestors="mindfulness-trainers@trainer-evenement-verbinding.parent" url_param="wpv-relationship-filter"]
<div class="col-sm-4">
<div class="form-group">
<label for="wpv-relationship-filter">[wpml-string context="wpv-views"]Trainers[/wpml-string]</label>
[wpv-control-post-ancestor type="select" ancestor_type="mindfulness-trainers@trainer-evenement-verbinding.parent"]
</div>
</div>
[/wpv-control-post-relationship]

But for some reason, it's doesn't seem to work. I did the same with the view "inspiratie-pagina", and there it works just fine. Besides, when I look at the text als the drop down l see "Please select". However, the language in which I'm building the site is Dutch, so I want to change this. When I look at the shortcodes, I don't see where I can change the text. Can you tell me where I can do this? Thanks!

#1310969

Hello,

I can get your website credentials from previous thread:
https://toolset.com/forums/topic/editing-search-view/

I am checking it in your website, will update here if there is any found

#1311011
Trainers.JPG

I have tried it in your website, withe below steps, please correct me if there is anything missing:
1) Open URL:
hidden link

2) In the select drop down menu "Trainers", choose option "Kerim Fathallah", then I see one result, see screenshot Trainers.JPG

It works as expected, since there is only one related "Evenementen" post in post "Kerim Fathallah", you can see the settings here:
hidden link
in section "Trainers Evenementen verbinding"

What do you mean this:
But for some reason, it's doesn't seem to work.
Please provide detail steps to duplicate the same problem, thanks

#1311031

That's so weird! Now I see that it works too. Maybe it had got something to do with the caching? So, can you tell me how I can change the text :)?

#1311041

You can use attribute "default_label" to shortcode [wpv-control-post-ancestor] to customize the text "Please select", for example:
[wpv-control-post-ancestor ... default_label="--- select one ---"]

More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-ancestor
'default option text'
adds a default option like All, Any or Select one on a select control.

#1311119

My issue is resolved now. Thank you!