Skip to content

Can't find a way to access context of AQL block within aql_query_vars filter #145

@bazalt

Description

@bazalt

Hi,

Thanks for your work, this is a great plugin that helps me a lot.

I'm working on a plugin that extends AQL to be able to query siblings posts on hierarchical post types.
To achieve this, I need the block context, to retrieve the post parent ID.

In aql_query_vars filter, using get_the_ID() or get_queried_object_id() works fine on the frontend but unfortunately it won't work on the admin editor, causing the AQL block to display inaccurate posts in admin.

Do you have any advice about the right way to retrieve the context in the editor?
Thanks.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions