Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I have multiple custom taxonomies to handle my events. I’ve been trying to make it work, as explained in step 6:

    at my functions.php:

    add_filter('em_events_get', 'my_em_taxonomies_events_get', 1, 2);
    
    function my_em_taxonomies_events_get($events, $args) {
    	if(!empty($args['speaker'])) {
    		foreach($events as $event_key => $EM_Event) {
    			// check if the post is inside the specific term and unset the others
    		}
    	}
    	return $events;
    }

    at my query:
    echo EM_Events::output(array('speaker'=>'john-doe'));

    as I ran some debug i realized that my “speaker” attribute is not passing through the args… do you know any reason for that?

    thanks in advance

    oops, already fixed it

    i forgot to set the default_search filter, as mentioned first… sorry

    well… i stumpled upon another problem:

    as i unset the unwanted events (not under my specified speaker), how do I increase the loop to reach my specified limit?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you should probably modify the search SQL conditions instead of the above. Since attributes are now post meta, you can just search within the post meta as a subquery for example.

    The function is EM_Events::get_sql_conditions(), the hook is in there.

    thanks Marcus
    for that I should turn my term assignment into a post meta (using post meta hooks)?

    That seems strange… I wouldn’t like to create a custom meta for every term assignment. That doesn’t look very right to the WP semantics.

    To make the SQL condition properly (using the term assigment) I need to be able to add a JOIN in the sql query, so I can consult my custom taxonomies. Is there any hook for that?

    The query attrs are pretty good, but they completely exclude all the WordPress common query attrs. It seems kind of late to propose that, but I think you guys should check out how the WP E-Commerce plugin works around with their query system:

    <?php query_posts('post_type=wpsc-product'); ?>
    <?php while (wpsc_have_products()) :  wpsc_the_product(); ?>

    More info: http://docs.getshopped.org/category/developer-documentation/

    Hope you consider!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    since events are custom posts now you can completely circumvent our search functions if you want. eventually I might even add some sort of way to choose how EM searches for events too (our way or WP_Query way).

    you’re right about the join issue, something I’d consider looking at when time permits…

    Hi Marcus,

    I realized I’m able to use the scope attribute (the most important to me) inside WP_Query. But they only accept ‘past’, ‘future’, ‘all’, ‘next-month’, etc… They don’t accept ‘2012-02-01,2012-02-28’. Do you know why is that?

    About the custom taxonomy querying, I think that even creating a hook for the join issue is not a great solution. It will probably work, but would still be very hard for regular users to integrate custom taxonomy to their events.

    Maybe a custom hook that register the taxonomy, by the name, for the Events Manager plugin, fully integrated?

    Thanks

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Currently, this is only implemented for the admin area (e.g. where you choose future/past/etc. scopes.

    I’ll be fixing that soon, eventually you’ll be able to use WP_Query to make the same queries/values made with our search attributes.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Events Manager] Adding Taxonomy Sorting in v5’ is closed to new replies.