Hello,
Thanks for the plugin that helps a lot.
And I’d like to know is it possible to get a custom args in shortcode and make it as a variable in the meta_query key in function?
I’d like to have my shortcode looks like this
[query slug="history" args="hyear=2024"]
My custom callback called qw_custom_meta_query_filter_callback
and the code is as below
function qw_custom_meta_query_filter_callback($args, $filter){
$args['meta_query'] = array(
array(
'key' => 'datetime',
'type' => 'CHAR',
'compare' => 'LIKE',
'value' => 2024
),
);
return $args;
}
I don’t know how to replace the value into a variable
Hope someone would give me some advice!
]]>We recently upgraded a client to PHP 8.1 and was receiving this error:
PHP Fatal error:? Uncaught TypeError: Illegal offset type in isset or empty in /[deleted]/wordpress/wp-content/plugins/query-wrangler/includes/overrides/post_type_archive.php:110
After doing some debugging it appears that the $post_type being received was an array consisting of [ ‘podcast’, ‘post’ ].
Line 110 contains:
if ( isset( $post_type_archives[ $post_type ] ) && $qw_query = qw_get_query( (int) $post_type_archives[ $post_type ] ) ) {
Which throws the error.
Adding this fixes it:
if ( !is_array( $post_type ) && isset( $post_type_archives[ $post_type ] ) && $qw_query = qw_get_query( (int) $post_type_archives[ $post_type ] ) ) {
Is this the correct approach or did the original designer/developer for the site misuse the post_type tags and should be sending a string rather than array?
]]>Hi,
any solution to set pager to off inside a shortcode call?
Thanks
I notice this plugin was last updated 9 months ago and only tested with the 5.8.x version of WordPress. I’m wondering if there are plans to keep it going through 5.9.x and beyond? Thanks!
]]>Is there a way to display the results of the query in a dropdown menu/list instead of just a standard list?
I’m querying a list of player names
My end goal is once one player is selected from the dropdown list it will open the players page (ideally without having to reload the page but i can probably work around that).
Thanks
]]>Hi there,
Just want to check if this plugin will still work when WordPress upgrades to 5.8?
Thanks!
]]>I guess the topic title suggests it all. I would like to make the content from my CPT show in a list, arranged by title but with the sticky items first.
I use a plugin called ‘Custom post type sticky’ to enable sticky posts for CPTs.
This works for one of my queries (showing CPT content) that have the sorting set to random. It puts the sticky post first.
Put for another query which has the sorting set to ‘Title: ASC’, it doesn’t work.
Can you help?
]]>Hello
I upgraded Query Wrangler to 1.5.49 and this seems to conflict when Elementor 3.1.1 (Running WordPress 5.6.2)
Displaying debugging in wp-options.php gives me the following fatal error
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /Users/thonek/Sites/wilvc-cleanme/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/query-wrangler/includes/basics/header.php:45 Stack trace: #0 /Users/thonek/Sites/wilvc-cleanme/wp-includes/class-wp-hook.php(287): {closure}(Array) #1 /Users/thonek/Sites/wilvc-cleanme/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #2 /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/query-wrangler/widget.query.php(69): apply_filters('qw_pre_render', Array) #3 /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/elementor/includes/widgets/wordpress.php(271): Query_Wrangler_Widget->widget(Array, Array) #4 /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/elementor/includes/base/controls-stack.php(1892): Elementor\Widget_WordPress->render() #5 /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/elementor/includes/base/widget-base.php(549): Elementor\C in /Users/thonek/Sites/wilvc-cleanme/wp-content/plugins/query-wrangler/includes/basics/header.php on line 45
This is on a page where query wrangler shortcodes are on an Elementor page where the default shortcode widget is used.
]]>Hi Johnathan,
Again thanks so much for this very much overlooked plugin to bring some of the basic Views functionality of Drupal into WordPress.
I know this issue was mentioned (I think about 6 years ago) but this is something I think is really important to have, if at all possible in this plugin, and that is the ability to hide the Header or Footer output of a query, when there are no results and the ‘Empty Text’ is shown.
I know you gave a PHP function for the person who previously asked, but I’m too scared to try this at the moment as a lot has changed in 6 years.
Any way this can be added (or perhaps it’s already there, and I’m just being blind)?
Thanks again!
]]>Hi there,
I am working with a site using WCFM.
we are trying to show a page with a list of vendors ( grid) and we would like it to be filtered by categories of their product and subsequentially by subcategories.
the filters should be like nested buttons.
so first we have a number of buttons for each category But1, But2 etc = Cat 1 , Cat2 etc ;
when clicking on But1 we will have via Ajax the buttons But1.1, But 1.2 showing up. And the list of vendors would be filtered based on the selection
like nested tabs, but they are actually buttons.
Could you please suggest any way to go around for it?
Kind regards,
a
I’m really enjoying using Query Wrangler, but I don’t seem to be able to figure out how to simply query posts within a certain category (with ID=95). Do I use the callback feature for this or is there a simpler way do this?
Thanks for any support!
]]>Is it possible to limit characters in a custom field?
]]>Is there a way using this plugin to display standard posts on a custom taxonomy category archive page where the standard post category is a 1:1 with the custom taxonomy category?
In other words, I have a number of posts for categories:
Test category A
Test category B
Test category C
The custom taxonomy has categories:
Alpha category
Beta category
Test category A
Charlie category
When I go to the custom taxonomy archive page for “Test category A”, I would also like to see standard posts from “Test category A”.
]]>Hello! i did a query that has events from different perspectives. It went well. I would like to sort this out as of today. I don’t know the solution to this, if it can be solved at all.
thanks
Attila
Hello, I’ve created a query that shows recent articles – but I don’t want it to show an article if the user is currently on it.
So, basically, I want to filter by the current post ID. I’m sure its possible, as if I manually enter a post ID and have the filter set to post_not_in then it works as expected.
I just need to know how to call the current ID?
Great plugin though! Brings back happy memories of Drupal!
Thanks,
Mike
]]>Is it possible to add an ‘Any’ or ‘All’ option to exposed taxonomy filters? I’ve tried using a custom callback and also nesting all of my taxonomy terms under an ‘All’ parent, but nothing seems to be working.
]]>Hey,
I would like to create another filter. My current project requires that I display posts that are only visible to the author. Rather than over-complicating things, I would prefer to have less plugins and make it easier long term. So adding another option for a “current user” filter to the author dropdown would be ideal. Can you help point me in the right direction? Thanks.
]]>Hello,
Everything was running fine Friday but now, after the newest version(I am calling the 1.5.45/1.5.46 versions both the new version for this post) has been installed, the posts being pulled no longer switch when you switch pages.
Page account appears to be correct, but only the initial handful on the first page show up no matter what page I try to start viewing things on.
It acts this way across multiple different queries, all the ones using pagination at least.
We are not using offset at all, so I don’t think it is the same issue as the other couple of threads that look to have popped up with the new version.
Thank you for your assistance.
]]>Hi,
It seems that the latest version breaks the pages on my site in which shortcodes are used.
I get the following notification on the page itself:
There has been a critical error on your website.
Learn more about debugging in WordPress.
enabling the debugger I get the following error:
Notice: Undefined index: custom_field in /wp-content/plugins/query-wrangler/includes/handlers.php on line 142
Fatal error: Uncaught Error: Call to undefined function d() in /wp-content/plugins/query-wrangler/includes/query.php:23 Stack trace: #0 /wp-content/plugins/query-wrangler/includes/class-qw-shortcodes.php(50): qw_execute_query(‘9’, Array) #1 /wp-includes/shortcodes.php(343): QW_Shortcodes->query_shortcode(Array, ”, ‘query’) #2 [internal function]: do_shortcode_tag(Array) #3 /wp-includes/shortcodes.php(218): preg_replace_callback(‘/\\[(\\[?)(query)…’, ‘do_shortcode_ta…’, ‘<div class=”pf-…’) #4 /wp-includes/class-wp-hook.php(287): do_shortcode(‘<div class=”pf-…’) #5 /wp-includes/plugin.php(206): WP_Hook->apply_filters(‘<div class=”pf-…’, Array) #6 /wp-includes/post-template.php(253): apply_filters(‘the_content’, ‘[query …’) #7 /wp-content/themes/anew/single-browse.php(38): the_content() #8 /home/almo in /wp-content/plugins/query-wrangler/includes/query.php on line 23
Might this be something in my configuration?
For now I have rolled back to a backup from yesterday, and not updated to the latest version.
Hi,
It seems that the latest version breaks the pages on my site in which shortcodes are used.
I get the following notification on the page itself:
There has been a critical error on your website.
Learn more about debugging in WordPress.
enabling the debugger I get the following error:
Notice: Undefined index: custom_field in?/wp-content/plugins/query-wrangler/includes/handlers.php?on line?142
Fatal error: Uncaught Error: Call to undefined function d() in /wp-content/plugins/query-wrangler/includes/query.php:23 Stack trace: #0 /wp-content/plugins/query-wrangler/includes/class-qw-shortcodes.php(50): qw_execute_query(‘9’, Array) #1 /wp-includes/shortcodes.php(343): QW_Shortcodes->query_shortcode(Array, ”, ‘query’) #2 [internal function]: do_shortcode_tag(Array) #3 /wp-includes/shortcodes.php(218): preg_replace_callback(‘/\\[(\\[?)(query)…’, ‘do_shortcode_ta…’, ‘<div class=”pf-…’) #4 /wp-includes/class-wp-hook.php(287): do_shortcode(‘<div class=”pf-…’) #5 /wp-includes/plugin.php(206): WP_Hook->apply_filters(‘<div class=”pf-…’, Array) #6 /wp-includes/post-template.php(253): apply_filters(‘the_content’, ‘[query …’) #7 /wp-content/themes/anew/single-browse.php(38): the_content() #8 /home/almo in?/wp-content/plugins/query-wrangler/includes/query.php?on line?23
Might this be something in my configuration?
For now I have rolled back to a backup from yesterday, and not updated to the latest version.
]]>We have a page using three Query Wrangler queries, all with the same query parameters. The first four (large top and three medium) stories are one query, the next three stories are a second query using an offset of 3, and underneath the violator is a third query, using an offset of 6. When you press the Load More button, which just fetches the next page using AJAX, you’ll see the third (bottom) query cycles back to the stories it missed within the first page of 10. Can you tell us if there is a way to get this to work?
Password for the page is qw-support
]]>To display life posts by category on a one page website (including the commentary form), I use this shortcode:
[qw_query slug="band"][wpsites_comments_template]
It should work with permalinks set to: …/%category%/%postname%/
The resulting page shows all posts not just those by selected category.
Any takers on what I a missing out on is greatly appreciated.
Thank you Jonathan for your promising plugin,
Mark
]]>Hello Jonathan,
Thank you for your excellent Querry Wrangler plugin.
I am using it on a one-page website to display posts and would like the standard comments option (add comments) to be made available with the queried posts.
Any pointer or help is greatly appreciated.
Thank you again,
Mark
I’m curious how to get my filter to be exposed to a pages taxonomy. I have a “product” taxonomy and “industry” taxonomy. I’d like to be able to spit out posts that:
Matches the pages ‘product’ taxonomy and filters the attached’industry’ taxonomy terms based on that. The result I’m looking for is pretty much an automatically exposed filter. Is this possible?
]]>I may be missing something, but it looks like using Random Sort order has no affect on the ordering? It’s always ordered by alpha instead.
As a long time Drupal developer who’s moving to WordPress, I’d like to thank you for this awesome plugin. Views was one of the Drupal modules I used on every project.
]]>oops. i’m an idiot. ***delete***
]]>I have a hard time figuring out how the meta value number sorting could possibly work.
I have tried this: https://www.ads-software.com/support/topic/orderby-meta_value-1/#post-6719953
But with no luck, so maybe someone can point my to the right direction!?
I have a custom date field (made with advanced custom fields) “date_start”. I have added the field to my views and added in the “Filter” section a “Meta key” with the value “date_start”. Then I added to the “Sort” section a “Meta value number”. This is the only sort option here.
The result is a unsorted list, no matter if I choose asc or desc. The list is not sorting in any way.
What am I doing wrong? Do I have to configure the custom date field in a special way? Do I need the Pro-Version of Advanced Custom Fields?
Thanks for your help in advance.
]]>Hi there,
I’ve used Query Wrangler previously, however for the current site I’m working on, I cannot see the Custom Field: insert-html in the list of possible fields. I can see it on one of my previous sites.
Would anyone know how I can get it back?
I’m using WordPress 5.1
PHP version is v7.0.33 (this is my hosting service).
Thank you!
]]>A query is showing older content with featured images fine but the most recent one is not showing. The featured image is set, it’s a regular .jpg and it’s uploaded normally into the media library. I’ve also disabled caching, just to be sure it’s not a cache issue.
Why is query wrangler not displaying the featured image?
]]>As a Drupal guy, this is EXACTLY what I was looking for. THANKS! However, I’m having issues getting the plugin to pick up my template files to get full control of display output. I copied the template file from the default location as indicated in the preview output. I put it into my template folder:
MYTEMPLATENAME/templates/query-unformatted-blog-roll.php but my edits are not getting picked up. I see that when I edit my Row style, there is an option “Template Part Settings”, but I don’t see any documentation on if/how that should be used? I assumed by just putting the file in the location suggested, and naming it per the template suggestions it should just work. What am I missing?
Template Suggestions Output:
Array
(
[wrapper] => Array
(
[0] => query-wrapper-blog-roll.php
[1] => query-wrapper.php
[2] => templates/query-wrapper.php
[found] => (default) /MYROOTPATH/public_html/wp-content/plugins/query-wrangler/templates/query-wrapper.php
)
[style] => Array
(
[0] => query-unformatted-blog-roll.php
[1] => query-unformatted.php
[2] => templates/query-unformatted.php
[found] => (default) /MYROOTPATH/public_html/wp-content/plugins/query-wrangler/templates/query-unformatted.php
)
[row_style] => Array
(
[0] => query-field-blog-roll.php
[1] => query-field.php
[2] => templates/query-field.php
)
)
]]>