Skip Navigation

[Résolu] Ajax filtering on taxonomy in a View doesn’t work in Elementor

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

Problem: I would like to use AJAX filtering on a View that is placed in an Elementor archive template, but it doesn't seem to work as expected.

Solution: Uncheck "Don't include the current page in query result"

This support ticket is created Il y a 5 années et 8 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : ,

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Twig Il y a 5 années et 8 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1223425

I created a standard View for a custom post type, and added a dropdown filtering taxonomy element. If I embed the view in a standard WP page, it works as expect - both in Ajax and page-refresh.

If i embed the same View within an Elementor page (like their Archive template) - the filtering only works for page-refresh (i.e. where the URL contains the filtering criteria). If I use any of the Ajax options, only one Post is displayed, despite other posts matching the criteria.

Are there known issues with the Elementor integration? I checked the errata and didn't see anything in the search...

Thanks!

#1223431

After some debugging, it seems that this issue is only present when the "Don't include current page in query result" checkbox is checked in the View. I don't know what this checkbox does (maybe reset the wp_query()? ?) but the default state (checked) will break the Elementor Ajax integration.

#1223531

Okay yes this checkbox does affect the query, and when the View is placed on an archive it can cause some unexpected results because an archive isn't a single post. In general, I recommend you keep this checkbox unchecked unless you're placing a View of posts on a single post template (of the same post type). In those cases, you might only want to show "other" posts in the results, and exclude the current page. Otherwise, uncheck this checkbox.

#1223538

Thanks - that all makes sense.

I guess of all the possible applications of a View, having the "single post of same type show everything except current page" seems like an uncommon use-case, so I would think that perhaps the default state of that checkbox should be UNCHECKED instead of checked. Maybe something to ping to the devs? Or at least make the tooltip a bit more explicit.

Anyway - thanks for the info!