Ryan Welcher
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Query Loop] OffsetHello and thanks for using AQL!
Yes, you can set an offset. It is found under the three dots menu beside the Display controls.
Forum: Plugins
In reply to: [Advanced Query Loop] filter by meta_key date field > nowThis is a great approach! I am working on adding some native ways to define dynamic items like todays date, current user, current post etc etc but in the meantime this will work really well.
Forum: Plugins
In reply to: [Advanced Query Loop] Show posts after the current date doesn´t workThis is an odd one. You need to have published posts after the current date which requires you to publish and then change the published date I believe.
Forum: Plugins
In reply to: [Advanced Query Loop] No results textThere is no difference between the core Query Loop and AQL blocks in the way that the templates are used. There should be a section to add blocks when no posts are found in the template. Can you provide a screenshot or link to see what you are running into?
Forum: Plugins
In reply to: [Advanced Query Loop] Filter for current yearHello @leumar thanks for using AQL!
At this point, it’s not possible to do this in AQL. I am working on some dynamic values to allow settings values for things like current year, current user, current post etc. I have been very busy for the past few weeks and have not had a chance to implement this and release it.
Thanks for your patience and I promise I’ll get this done soon!
Forum: Plugins
In reply to: [Advanced Query Loop] insert break into query loopUnfortunately, this isn’t something that is possible. The template being displayed will always be the same in the Query Loop. You may try adding the Block Visibility plugin to see if there are options there but AQL and the core Query Loop block don’t support this.
Forum: Plugins
In reply to: [Advanced Query Loop] Category Posts and Order By Custom FieldDid this work for you?
Thanks for confirming
Forum: Plugins
In reply to: [Advanced Query Loop] Category Posts and Order By Custom FieldHi and thanks for using AQL!
I think this can be done by creating a taxonomy query for the term (train), a meta query for
historic_date, and then setting the Order By option to use either Meta Value or Meta Value Num.This is my attempt without any of the data so you may need to tweak it:
{"queryId":0,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"meta_value","author":"","search":"","exclude":[],"sticky":"","inherit":false,"multiple_posts":[],"include_posts":[],"tax_query":{"relation":"OR","queries":[{"id":"cb32d34f-7e79-42a7-b3b4-ca2f6d50dd02","taxonomy":"category","terms":["train"],"include_children":true,"operator":"IN"}]},"meta_query":{"queries":[{"id":"e4306161-6e3c-4616-a76b-ddb9fbf49e19","meta_key":"historic_date","meta_value":"","meta_compare":"EXISTS"}]}},"namespace":"advanced-query-loop"}I hope this helps!
Forum: Plugins
In reply to: [Advanced Query Loop] Query Attachments?Hello and thanks for using AQL!
You can query for attachments by adding them to the additional post types area. Unfortunately, you can’t remove the existing page/post option but you may be able to get around that by selecting a taxonomy term that doesn’t exist on them
Forum: Plugins
In reply to: [Advanced Query Loop] Post Order By Meta Value Not WorkingHello and thanks for using AQL!
I’m sorry you’re running into this. I’ll need to set this up locally to debug it. Can I assume that the
last_namefield is a the lowercase version of the last name being displayed?Is this a custom post type or just posts with a category assigned?
Is the issue that there are missing people or just out of order? The reason I ask is that Laura Ambrose is missing from the provided link but in the screenshot.
Thanks for your patience here!
Forum: Plugins
In reply to: [Advanced Query Loop] External Site/RSS FeedHello and thanks for using AQL!
Unfortunately, this is not something that AQL supports. Best of luck!
Forum: Plugins
In reply to: [Advanced Query Loop] Suggestion on implementation?This is not something that can be done in AQL directly but you may be able to achieve the same effect using sticky posts. I believe there are plugins you can use to enable that for custom post types but that’s outside the scope of support. Best of luck!
Forum: Plugins
In reply to: [Advanced Query Loop] Random order?Yes, it adds more options to order by.
Forum: Developing with WordPress
In reply to: How to hook into the save function of a Gutenberg blockIf I might make a suggestion to check the permission for the user on the client side and disabling the input as needed based on that check. That will remove the need to fight with the
You could use the canUser selector to determine the access. Something like the following (note that this is not tested code):
const canEdit = useSelect(
( select ) =>
select( 'core' ).canUser( 'edit', {
kind: 'postType',
name: 'post',
id: 1234,
} ),
[]
);There is also canUserUseUnfilteredHTML that might be easier:
const canEdit = useSelect(
( select ) => select( 'core/editor' ).canUserUseUnfilteredHTML(),
[]
);