• Resolved Nishant Patel

    (@nishantpatel121)


    I created custom skin for the event calendar pro events with help of ele custom skin pro and displaying in Elementor Post Widget.
    Question is I want to filter our only events that has Featured Event Option checked.

    To Display according event start date using custom Custom Query ID
    add_action( ‘elementor/query/my_custom_filter’, function( $query ) {
    //$query->set( ‘post_type’, ‘event’);
    $query->set( ‘orderby’, ‘meta_value’ );
    $query->set( ‘meta_key’, ‘_EventStartDate’ );
    $query->set( ‘order’, ‘ASC’ );

    });

    Now I Need Only events that are featured event.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Truman

    (@tdorn)

    Hi there,

    Apologies for the delay on this response, we are currently trying to work through a backlog of posts, so I wanted to stop by and answer this.

    If you are looking for the filters and such to pull Featured Events, I think this section of our Developer Docs might help! : https://docs.theeventscalendar.com/?s=Featured_Events

    Thread Starter Nishant Patel

    (@nishantpatel121)

    Thanks a lot this code Solved my problem.
    The Event Calendar Events to display in elementor post widget. Only display feature events.

    add_action( ‘elementor/query/my_custom_filter’, function( $query ) {
    $meta_query = (array)$query->get( ‘meta_query’ );
    $meta_query[] = array(
    ‘key’ => Tribe__Events__Featured_Events::FEATURED_EVENT_KEY,
    ‘compare’ => ‘EXISTS’,
    );
    $query->set( ‘meta_query’, $meta_query );
    $query->set( ‘orderby’, ‘meta_value’ );
    $query->set( ‘meta_key’, ‘_EventStartDate’ );
    $query->set( ‘order’, ‘ASC’ );
    });

    Plugin Support Truman

    (@tdorn)

    Thank you for letting me know, and for resolving this topic!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only Display Featured Events Filter Query Elementor Post Widget’ is closed to new replies.