Skip Navigation

[Résolu] view filter editor

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
When i filter the results, slider stop working.
Solution:
This issue is arise due to following script.

<script src="/wp-content/themes/Divi-child/sly.min.js"></script>
<script src="/wp-content/themes/Divi-child/horizontal.js"></script>

You can call that slider function again when search results updated. You can use following js event it will trigger after search results update.

jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.layout (object) The jQuery object for the View layout wrapper
    */
         
YOUR CUSTOM CODE GOES HERE
        
});

Relevant Documentation:

This support ticket is created Il y a 6 années et 2 mois. 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Marqué : ,

This topic contains 5 réponses, has 2 voix.

Last updated by alexd-6 Il y a 6 années et 2 mois.

Assisted by: Noman.

Auteur
Publications
#616275
Bildschirmfoto 2018-02-15 um 10.53.46.png
Bildschirmfoto 2018-02-15 um 10.53.34.png

I am trying to:
set a filtereditor, which works, to push items of a cpt in a Slider construct. This all works fine but when i filter the slider stop working.

I dont find the Problem and i saw no difference in Source Code in the Site.

Slider loads a horizontal.js at load.

Can you help me?

Link to a page where the issue can be seen:

hidden link
the Second Slider with Headline "OBJEKTE IM SELBEN PROJEKT:"

I expected to see:

the filtered items are slideable in SlySlider

Instead, I got:

after you load the filter (only click enter - the button is not show) and all Items go to sort in 3 columns

#616316

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Alex,

Thank you for contacting Toolset support. When I visited this link and change the filter values, then slider does not break:
hidden link

When I select the radio option and click “Enter” from keyboard then slider breaks. But this is not the correct behaviour of filters if AJAX is enabled in the View. Means without clicking “Enter” the results should filter.

Could you please also try to check it by deactivating all third-party plugins (except Toolset) and switching back to the Default Theme (e.g. Twenty Sixteen theme) to see for any possible conflicts with any of the plugins or themes?

Thank you

#616342

Hi, thank you for troubleshooting. - All these Things i try before i asked you. Now i do that again - but it won't work.

This must be a Problem of the Filter.. -

thanks for help again 😉
alex

ps: do you wanna have a login?

#616349

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

yes, please provide temporary access WP-Admin Login and FTP login info to your site. Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the link to the [View] Edit Screen.

Thank you

#616494

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

2016 theme.png

Hello Alex,

The issue is gone when we activate default theme(twenty sixteen) as in attached screenshot. This issue is arise due to following script.

<script src="/wp-content/themes/Divi-child/sly.min.js"></script>
<script src="/wp-content/themes/Divi-child/horizontal.js"></script>

When search trigger, then slider content get updated according to new matching results that’s why slider stop working. We need to re-initialize slider.

You can call that slider function again when search results updated. You can use following js event it will trigger after search results update.

jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.layout (object) The jQuery object for the View layout wrapper
    */
        
YOUR CUSTOM CODE GOES HERE
       
});

I hope it helps.

Thank you

#616497

Thx Noman, you are great! - That fixes my Problem! - Thank you very much, see you in the shed!

regards - alex

ps: if you meet me anytime, i will pay you a beer!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.