I am trying to shoe featured images from featured events with slider revolution

Home Forums Calendar Products Events Calendar PRO I am trying to shoe featured images from featured events with slider revolution

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1357555
    jesus huaman
    Participant

    Hello,
    Can someone help me?
    I am trying to show featured images from featured events only with slider revolution but it is not working.
    My slider ID: feature. I getting an error that says that argument number 2 for function revslider_post_based_featured_events_w_featured_image() is missing.
    I am currently using:

    function revslider_post_based_featured_events_w_featured_image( $query, $slider_id) {

    $slider_ids_to_affect = array( “feature” );

    // if this slider is not one to affect, do no filtering
    if ( ! in_array( $slider_id, $slider_ids_to_affect ) ) {
    return $query;
    }

    // get the existing meta_query so we aren’t wiping that out
    if ( ! empty( $query[‘meta_query’] ) ) {
    $meta_query = (array) $query[ ‘meta_query’ ];
    } else {
    $meta_query = array();
    }

    // do the filtering…

    // has a Featured Image
    $meta_query[] = array(
    ‘key’ => ‘_thumbnail_id’,
    ‘compare’ => ‘EXISTS’,
    );

    // is a Featured Event (requires The Events Calendar version 4.4+ from January 9, 2017)
    if ( class_exists( ‘Tribe__Events__Main’ )
    && class_exists( ‘Tribe__Events__Featured_Events’ )
    && Tribe__Events__Main::POSTTYPE === $query[‘post_type’]
    ) {
    $meta_query[] = array(
    ‘key’ => Tribe__Events__Featured_Events::FEATURED_EVENT_KEY,
    ‘compare’ => ‘EXISTS’,
    );
    }

    $query[‘meta_query’] = $meta_query;

    return $query;
    }

    add_filter( ‘revslider_get_posts’, ‘revslider_post_based_featured_events_w_featured_image’, “feature” );

    #1357556
    jesus huaman
    Participant

    This reply is private.

    #1358594
    Cliff
    Member

    Hi, Jesus.

    Please review https://theeventscalendar.com/knowledgebase/integrating-events-calendar-slider-revolution-essential-grid/

    Hopefully it’ll be the solution you were looking for!

    Please let me know how this goes for you.

    #1368723
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘I am trying to shoe featured images from featured events with slider revolution’ is closed to new replies.