Unless I am mistake, you can only exclude ‘all categories’ or ‘all tags’, right?
And not select specific ones like with the exclusion.
If so, is there. a workaround?
Is it possible to display “all” under post types? I have some custom post types and by default there are posts and pages, I would like to display certain ones or all of them in date order. Meaning something like this
etc. based on date. Is that something that you can add? It would be awesome to be able to select which types to display or be able to select ALL.
]]>In the lower part of our page we have a sections showing reviews from customers powered by your plugin with the load more button that displays one post at a time.
When you click load more to display all the posts then refresh the browser window you only get the last post displayed and all other previous ones disappear.
Is it possible to keep displaying all posts?
]]>Hello,
I have tried several times to set the start and end dates.
but it’s always the same request :
…
AND ( YEAR( wp_posts.post_date ) >= 2017
AND MONTH( wp_posts.post_date ) >= 1
AND DAYOFMONTH( wp_posts.post_date ) >= 1 ) )
…
Can you do something please?
Best regards,
Stephan Renault
]]>I want to display the children pages of the current page. Right now it’s not possible, because i want this function to be in a template. Is there any possibility to set the current page as the parent category with this plugin? That would be awesome!
]]>Hello,
I am experiencing an issue with the pagination generated by the Advanced Query Loop plugin on my website. Currently, the URL for subsequent pages appears in the following format:/?query-24-page=2&cst
instead of the more standard format:/page/2/
.
This affects both the user experience and potentially SEO. I would like to know if there is a solution to ensure that the pagination URL follows the more conventional structure (like /page/2/
).
Could you please let me know if there’s a configuration option or if a code modification is needed to fix this behavior?
Thank you in advance for your help and for the great work on this plugin!
Best regards,
Dimitri DALLEAU
Hi,
I have specific use case that is not supported with the current implementation of dates filtering.
I need to display 2 lists of posts for one of my clients:
The “All posts from the last month” I can easily achieve with this plugin, but I can’t seem to be able to achieve the “All future posts” part.
The current date filter allows us to use before, after and between filters, but all of those are based on a specific date you select on the calendar.
How about, alternatively from selecting the date on the calendar, I could also select “Today” and that would be a dynamic date always based off the current day.
In order to achieve the use case, I actually had a custom version of this plugin with this piece of code in the process_date_range function:
case 'in-future':
return array(
'after' => 'today'
);
However, I got a bit tired of adding it after every each plugin update.
Let me know if something like this it would be possible, or if you have any other idea on how I could solve this “future posts” use case ??
Thanks and keep up the awesome work!
]]>Hi,
Currently we can only exclude the current post from the loop. Can a feature be added to exclude all posts from certain categories that we can select?
Thanks.
]]>This is probably a dumb question, but: are there any more examples of how to use aql_query_vars besides the one in Extending AQL?
I struggle to understand the syntax needed to, for example, dynamically add a taxonomy to $query_args[‘taxquery’].
Obviously having dynamic placeholders would be ideal for this, and a lot less messy, but unfortunately I can’t wait for these to appear (unless it’s planned for very soon).
I have a meta field called ‘events_start_date’ which displays the month and the day. I need a way to order the posts by this field so that events stay together by month and stay in order by day of the month. How do I set this up?
]]>I am trying to make a meta query that query’s for a relation. To check this relation i want to use the Post ID. Is this possible with this plugin?
]]>I am planning to build a site which will probably end up with thousands of posts. At the bottom of every blog post or article, I will be using na AQL block (either specifying a particular category or to query all the categories) and using the “Random” option.
Now using the Random option and querying the entire DB might be expensive. But I am unable to find any information on this on what will be the impact. Let’s say I have 10k articles/blogposts and I use the Random sorting option in every AQL block on every post, what is the impact on the DB and on Response Times? Will a call be made to the DB every time a user accesses an article/blogpost? Can any caching mechanism be implemented to minimise DB calls yet keep the Random sorting option?
Thanks.
]]>Hi,
Currently the first criteria in the AQL or even the Core QL is to select the “Post Type”. Now if I create multiple Post Types using ACF, all of them appear as individual entries in this “post Type” drop down. I want to use the AQL block to make it fetch posts from all the different post types I have and not just one post type. How does one do that? Let’s say I run a recipe website and I have multiple Custom Post types like baked, grilled, steamed, fried, raw. When I create a post using one of these Custom post Types let’s say ‘baked’ , I want to add a AQL block at the end of the post which fetches posts from all the custom post types i have and not just one post type so that the user is shown posts from all different custom post types.
I see there is an option to select other post types under the “Additional Post Types” option under the “Advanced Query Settings” section but one has to manually type the post type name and select the different post types here. Is there an option to select all available post types? I understand everything is a post type in WP, but here i refer to posts and custom post types excluding pages, attachments etc, basically blog posts. Can an option to select all available post types (excluding pages, attachments etc) be implemented or option to select all post types including pages, attachments etc but another field below it to exclude certain post types like pages etc? Can this be implemented?
Or a drop down of all available post types (posts, custom post types, pages, attachments etc) with a checkbox to select the ones we want would also be a good solution instead of user having to type out each of them. Like a filter selection in excel where user can quickly select all or individual post types using a checkbox?
Thanks.
]]>Hello and thanks for the plugin
I am not able to use it because I have to make a query on several post types by custom taxonomy.
I hope you decide to make it because your plugin is very useful.
Have a good holidays
]]>Hi all
I have in reading options of WP 10 posts per view, and in AQL setted to 24 the number of posts to show per page
Finally, the plugin shows more than 100 posts per page (pagination works) ?i need something more to configure or can i override with a filter or with an action?
]]>I’m using Advanced Query Loop to display some results of a query of a custom post type. I’m having it list linked titles of a custom post type called “Clinical Sites” with a custom field of “actively_funded” as created by the Pods plugin. In this case, I’m trying to display all clinical sites where “actively_funded” is set to 1.
The problem lies in that I updated some of the clinical sites to set actively_funded equal to 0, but I can’t get the Advanced Query Loop block to reflect the changes. I even ran a query in the database to make sure of the results I should be getting, and it works fine there. But the block doesn’t update to reflect the changes, neither in Gutenberg nor on the live page.
I use CloudFront on AWS to cache the site, and I have flushed that cache multiple times, and the problem persists.
Any ideas how to fix this?
I have a custom post type and a page, where all posts oft this type should be orderd simply by the title, alphabetical. When editing the page this order is reflectet in the editor, fine. But when viewing the page in the frontend, the order isn’t anymore alphabetical. What’s gonig wrong?
]]>When attempting to select titles other than the default one, an error occurs, preventing the selection of different posts.
react-dom.min.js?ver=18.2.0:10 Uncaught TypeError: Cannot read properties of undefined (reading ‘title’)
at variations.js?ver=31095a155ced190e6fa5:1:11879
at variations.js?ver=31095a155ced190e6fa5:1:11930
at Array.map ()
at onChange (variations.js?ver=31095a155ced190e6fa5:1:11789)
at ae (components.min.js?ver=c4b2ef1c62202e4e2d1e:48:469116)
at se (components.min.js?ver=c4b2ef1c62202e4e2d1e:48:469143)
at onSelect (components.min.js?ver=c4b2ef1c62202e4e2d1e:48:472835)
at components.min.js?ver=c4b2ef1c62202e4e2d1e:48:363057
at Object.Xa (react-dom.min.js?ver=18.2.0:10:105741)
at B (react-dom.min.js?ver=18.2.0:10:10501)
Forgive me if this is obvious, but I’m scratching my head to figure out how to achieve this:
I’m using ACF, and I have a few custom fields tied to a custom post type. On the CTP-single template, I want to create a query loop that pulls all the other custom post type entries with the same value as the one that’s being viewed.
Is this not possible with the Advanced Query Loop as is? If I “hardcode” the value into the AQL, it works fine. But that’s not very useful, and I can for the life of me figure out how to reference the “current” value of the field.
Thanks!
]]>I am unable to select certain pages when using the ‘include post’ option. The pages exist and are published yet their titles do not appear in the dropdown field for selection when searching. I’ve included a screen recording to better explain the issue. You can see all the page titles listed to the left, yet they don’t appear when searching by title. Some pages are available for selection, though I can’t determine what differentiates these from the pages that are unavailable. Any ideas what might be causing this? Many thanks.
]]>Hi there,
Are there any plans for also adding a widget for non-FSE themes?
I think that’d be hugely popular.
]]>Hi there,
This might be a bit of an edge case, but I was wondering if it’d be possible to also sort the posts by the number of views stored in the Jetpack plugin, using the meta query option. If yes, how?
PS: Thanks again for this superb plugin. Brings me joy every day.
]]>Unless I’ve overlooked it, the immensely useful AQL for some reason doesn’t seem to have the option to order posts by Name (slug). This can be really useful in certain situation (e.g. list of persons where post slug = lastname-firstname while post title is Firstname Lastname).
Is there a specific reason to not include it?
I guess there must be a way to add it using some PHP magic, but I’d much prefer doing this in the UI.
Hi Ryan,
Thx for your work! I am using the plugin for a custom event query, to just show upcoming events, but when there a no upcoming events, the front-end shows an empty page. In the editor it shows the default “No posts found” message.
What I would like to do is show some custom content where there are no events to be shown, but I can not seem to find how to do this. Is this even possible? I am using a TwentyTwentyFour child theme here.
Thanks in advance!
]]>On this page we have 2 query loops that are supposed to be from the same source but being triggered by a True/False button in ACF. Basically we want the top 2 posts to be the highlighted posts and those shouldn’t show up in the main result body with the FacetWP filters. There’s also a little trick I implemented to trigger a invisible Facet to exclude the posts from the results form. And on the top results we use the ACF field for that. But what I noticed before is that the post meta query keys aren’t being saved when you press the update post button on the editor. If you reload the page those fields are empty. It could have something to do with Facet, I’m not sure, but what happens now is whenever you try to filter with Facet’s filters they don’t update the main query anymore. They look like they’re waiting for the filtering to be complete but it never finishes. Can you take a look to see what the problem might be? Also the meta keys not saving might need to be addressed in a bug fix.
Here’s a error my colleague pulled from the logs that might help.
Fatal error: Uncaught TypeError: AdvancedQueryLoop\Query_Params_Generator::__construct(): Argument #2 ($custom_params) must be of type array, null given, called in /www/mrwork_531/public/wp-content/plugins/advanced-query-loop/includes/query-loop.php on line 64 and defined in /www/mrwork_531/public/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php:60 Stack trace: #0 /www/mrwork_531/public/wp-content/plugins/advanced-query-loop/includes/query-loop.php(64): AdvancedQueryLoop\Query_Params_Generator->__construct(Array, NULL) #1 /www/mrwork_531/public/wp-includes/class-wp-hook.php(326): ComposerAutoloaderInit3d22ab91adb43d177572df3b253a90a1::AdvancedQueryLoop\{closure}(Array, Object(WP_Block)) #2 /www/mrwork_531/public/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #3 /www/mrwork_531/public/wp-includes/blocks.php(2046): apply_filters(‘query_loop_bloc…’, Array, Object(WP_Block), 1) #4 /www/mrwork_531/public/wp-includes/blocks/post-template.php(67): build_query_vars_from_query_block(Object(WP_Block), 1) #5 /www/mrwork_531/public/wp-includes/class-wp-block.php(463): render_block_core_post_template(Array, ”, Object(WP_Block)) #6 /www/mrwork_531/public/wp-includes/blocks.php(1705): WP_Block->render() #7 /www/mrwork_531/public/wp-content/plugins/facetwp-blocks/facetwp-blocks.php(581): render_block(Array) #8 /www/mrwork_531/public/wp-includes/class-wp-hook.php(324): FacetWP_Blocks_Integration->query_loop_render_block(‘<ul class=”colu…’, Array, Object(WP_Block)) #9 /www/mrwork_531/public/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘<ul class=”colu…’, Array) #10 /www/mrwork_531/public/wp-includes/class-wp-block.php(525): apply_filters(‘render_block_co…’, ‘<ul class=”colu…’, Array, Object(WP_Block)) #11 /www/mrwork_531/public/wp-includes/class-wp-block.php(443): WP_Block->render() #12 /www/mrwork_531/public/wp-includes/class-wp-block.php(443): WP_Block->render() #13 /www/mrwork_531/public/wp-includes/blocks.php(1705): WP_Block->render() #14 /www/mrwork_531/public/wp-includes/blocks.php(1743): render_block(Array) #15 /www/mrwork_531/public/wp-includes/class-wp-hook.php(324): do_blocks(‘<!– wp:group {…’) #16 /www/mrwork_531/public/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘<!– wp:group {…’, Array) #17 /www/mrwork_531/public/wp-includes/blocks/post-content.php(48): apply_filters(‘the_content’, ‘<!– wp:group {…’) #18 /www/mrwork_531/public/wp-includes/class-wp-block.php(463): render_block_core_post_content(Array, ‘<!– wp:group {…’, Object(WP_Block)) #19 /www/mrwork_531/public/wp-includes/class-wp-block.php(443): WP_Block->render() #20 /www/mrwork_531/public/wp-includes/blocks.php(1705): WP_Block->render() #21 /www/mrwork_531/public/wp-includes/blocks.php(1743): render_block(Array) #22 /www/mrwork_531/public/wp-includes/block-template.php(260): do_blocks(‘<!– wp:templat…’) #23 /www/mrwork_531/public/wp-includes/template-canvas.php(12): get_the_block_template_html() #24 /www/mrwork_531/public/wp-includes/template-loader.php(106): include(‘/www/mrwork_531…’) #25 /www/mrwork_531/public/wp-blog-header.php(19): require_once(‘/www/mrwork_531…’) #26 /www/mrwork_531/public/index.php(17): require(‘/www/mrwork_531…’) #27 {main} thrown in /www/mrwork_531/public/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php on line 60
]]>Hey Ryan!
I just noticed that I’m getting a critical error on my site. I think this is related to the 3.0.0 upgrade because I downgraded to the previous version and it fixed the issue. I’d be happy to give more context if you need it to help troubleshoot.
Here’s the error message I’m getting:
Uncaught TypeError: Return value of AdvancedQueryLoop\Query_Params_Generator::get_custom_param() must be an instance of AdvancedQueryLoop\mixed, array returned in /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php:83
CONTEXT:
{
"error": {
"type": 1,
"file": "/home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php",
"line": 83
},
"backtrace": [
"",
"#0 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Traits/Include_Posts.php(11): AdvancedQueryLoop\\Query_Params_Generator->get_custom_param('include_posts')",
"#1 [internal function]: AdvancedQueryLoop\\Query_Params_Generator->process_include_posts()",
"#2 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php(94): call_user_func(Array)",
"#3 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/query-loop.php(65): AdvancedQueryLoop\\Query_Params_Generator->process_all()",
"#4 /home/gdjhukv/public_html/wp-includes/class-wp-hook.php(326): ComposerAutoloaderInit3d22ab91adb43d177572df3b253a90a1::AdvancedQueryLoop\\{closure}(Array, Object(WP_Block))",
"#5 /home/gdjh"
]
}
]]>
First off, thanks for creating this, could not have done what I’ve set up so far with the “standard” WP Query Loop. My question is, when using your AQL block, I assume I also need a Post Template block as that seems to be inserted automatically. My problem is, the Post Template block is also lacking features in much the same way that the WP Query block is lacking features compared to your AQL block. My specific frustration is that the Post Template block appears to have no responsive controls whatsoever, so if I choose Grid, the value I set for columns cannot be changed based on device or viewport width. Any chance you might be creating an Advanced Post Template block to go along with AQL? Or am I missing something obvious in terms of the Post Template block settings? Thanks again!
]]>Hi Ryan,
your plugin is really helpful! It would be great to add the following:
Is it possible to show posts from the current month or year only?
]]>Hi there,
Thanks for the amazing plugin. Really love it.
Any chance we could get an option added to only show posts from, say, the last 1/6/12 months, instead of going for a specific date?
Currently, I always have to update the settings if I only want to show random posts from the last month.
]]>