• Resolved rasenkantenstein

    (@rasenkantenstein)


    Hi all,
    I am using Elementar&Crocoblock. With Crocoblock one is able to create custom listings. I have created such a listing based on events manager. It looks all exactly like I want it to look.

    However, there is one caveat. I only want to display future events. When using the widget, the widget itself takes care of querying only future events.

    With Elementor/JetEngine (Crocoblock) have the option to query terms, post-data, meta data etc.

    But let’s assume I want to use terms or post-data. What terms are actually available to check against future posts? Has anybody used EM with elementor?

    Thank you and best regards,
    Konstantin

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    Unfortunately, we are quite limited with regards to other plugins or themes at the moment and have not yet integrated or supported Elementar & Crocoblock.

    However, if it’s not the official Events Widget, you can need to try custom coding with wp_query.

    e.g.

    $loop = new WP_Query(array(
        'post_type' => 'event',
        'event-categories'=> 'workshops',
        'orderby' => 'meta_value', // We want to organize the events by date 
        'meta_key' => '_event_start_date', // Grab the "start date" field created via "More Fields" plugin (stored in YYYY-MM-DD format)
        'posts_per_page' => 20,
         'order' => 'ASC',
        'meta_query' => array( // WordPress has all the results, now, return only the events after today's date
            array(
                'key' => '_event_start_date', // Check the start date field
                'value' => date("d-m-Y"), // Set today's date (note the similar format)
                'compare' => '>=', // Return the ones greater than or equal to today's date
                'type' => 'DATE' // Let WordPress know we're working with date
                ) )
                ));
Viewing 1 replies (of 1 total)

The topic ‘Elementar&Crocoblock’ is closed to new replies.