-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PRO filter request] - Ability to override the post widgets wp_query with the global passed on archive pages etc #2109
Comments
I don't want to get into editing PHP or the theme files, so I'd like to see a way of applying Elementor layouts to the Archive and Category WP templates. |
Hi @arielk, some progress in this? It would be very useful for developers. |
We do have some progress on this but nothing ready yet. |
Hi @bainternet, any update on this topic? Thanks and kind regards |
closing in favore of #3826 thanks everyone. |
I have spent the afternon trying to find an elegant solution to the fact that there is no nice way to display category, archive and search pages in a way that mimics the post widget due to the fact that the WP_Query call is not dynamic in anyway.
For now here is my work around and also a filter request to be added to the PRO version.
Right now this will just display all the posts as the widget is stil calling the same static wp_query.
My solution is to add a filter to the following file
/plugins/elementor-pro/modules/posts/widgets/posts.php lines 64-66
Not the most elegant solution but this does allow me to then alter the query for the archive page as I see fit - in my case I am overriding the elementor query to load in the original global query which includes the tax_query and search as well
Like so
I am totally open to other methods to achieve this behaviour but from all my digging through the core code there seems to be zero ability to extend or override the current query in a way that makes it dynamic.
The text was updated successfully, but these errors were encountered: