Skip Navigation

[Resolved] custom query

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1725537

I created a CPT - Events
I created a custom field - wpcf-event-start-date

using "posts" widget of Elementor I like to order by wpcf-event-start-dat

in the Elementor widget I set Query ID to "events"

Now I am trying to build the filter

I wrote:

function myQueryFilter(){
$args['date_query'] = array(

'orderby' => 'wpcf-event-start-date',
);

return($args);
}

add_filter("events", "myQueryFilter", 10, 2);

but nothing ...
can you help me?

#1725871

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Barak,

Thanks for getting in touch.

This issue seems to be one that is best handled in the elementor forum.

I would recommend that you open a ticket with the elementor team to ensure that you are using the correct hook for this and format.
They will be able to guide you in the correct direction as this is a part of their plugin.

Thanks,
Shane