• Resolved security_man

    (@security_man)


    Excellent plugin first of all – very powerful and easy to work with. KUDOS!

    I have made several custom statuses for the events custom post type. They display fine in the back end with filters across the top of the events page, but i am having a devil of a time doing the same on the front end events list with buddy press. I figure i need to be able to query EM_Events::get($args) with the post_status (which is updating as expected), but when i add to the $args ‘post_status’=>'[custom status]’ it does not work. I know the custom status is correct because it displays fine on the list if i echo $EM_Event->post_status but i cant seem to query on it… any ideas?

    https://wordpress.org/plugins/events-manager/

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

    (@angelo_nwl)

    haven’t tried this yet but maybe you can try something like

    $post_data = get_post($post_id);
    echo $post_data->post_status;
    Thread Starter security_man

    (@security_man)

    Sorry, i didnt make myself clear. I shoulda told you the overall goal

    What i am trying to do is to make the filters at the top of the events list on the front page display (and sort by) the new statuses rather than the “draft, pending, past, future” links that are there now. in em-template-tags.php i see around line 230 where that starts happening. I didnt see any hooks to work with so i was going to modify the code there, but i am not able to query the post_status through the EM_Events::get( $args ) on line 263

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I see what you mean now, at the moment this is not available by default and you need custom coding on your part to make this work. You can try to look into the EM templates at events-manager/templates/templates/events-list.php or http://wp-events-plugin.com/documentation/advanced-usage/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to query with custom statuses’ is closed to new replies.