Viewing 15 replies - 1 through 15 (of 42 total)
  • Thread Starter Mariusz Szatkowski

    (@motylanogha)

    hi
    I have added a taxonomy “loc-category” for locations. In each location, I can set a hiererchical category, but how do I make the location archive.php/search/filter form also query for this taxonomy?

    I used:
    http://pastebin.com/3MTy5B2G

    I made taxonomy-loc-category.php but it doesn’t work…

    any suggestions?

    maybe this can help you out – http://pastebin.com/UMipT093

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    Thank you!
    What about category/archive template for this taxonomy?
    How would it work?

    have you tried Events > Settings > Pages > Location List/Archives > WordPress Location Archives

    e.g.
    http://domain.com/locations/

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    1. Thank you agelonwl, but now when I edit a location I have ‘event category’ module instead of ‘location category’ πŸ™

    do you know why?

    2. Can I use this shortcode just in archive.php template to list chosen category locations? Just like:
    <?php echo do_shortcode(‘[locations_list]’); ?>

    3.

    have you tried Events > Settings > Pages > Location List/Archives > WordPress Location Archives

    e.g.
    http://domain.com/locations/

    yes – archives is enabled as a default

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    even when I try to list taxonomy categories like: /wp-admin/edit-tags.php?taxonomy=em_location_cats I’ve got an error ;(

    I too am experiencing the same problem. It shows the events category, not the events one.

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    you meant locations one πŸ˜‰

    yep.. I feel we’re close to the target…

    @agelonwl any suggestion pleease?

    Yeah, sorry for the typo it was like 2 am.

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    they probably work mon-fri, so I hope we agelonwl will answer on monday πŸ˜‰

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Adding a custom taxonomy to locations using WP methods will allow you to set and manage categories for the location, however to integrate searching you need to code in hooks yourself. The only ‘automatic’ way this integrates is into the WP_Query loop, but you still have to make your own query.

    Whilst angelonwl’s suggestion may work, it’s not the most efficient one. He’s used the snippet found here as a basis for creating this new filter for you:

    http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/

    I’d recommend looking at the suggested alternate method, which would add a condition to the SQL instead. That’s how we do it with normal categories, and you can see this in action within classes/em-object.php around line 664

    With regards to the admin area, you probably have to add this as well, we do this in the file classes/em-event-posts-admin.php file under restrict_manage_posts(). You’d have to add a similar field in the same way.

    Hope that helps!

    I did this by cheating and installing this plugin πŸ˜‰

    http://wordpress.org/extend/plugins/custom-post-type-maker/

    I was able to add menus by the Location Type which is all I really needed.

    I may give this another shot trying to hard code into into functions.php in the future.

    Would be nice to have this functionality built in to the Events Manager plugin because it seems many people would use it and it does seem logical to want to categorize locations.

    I have it up on a test site: just hover your mouse over Drinking Holes.

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    Yep, taxonomies of mine works fine as well.
    I don’t know why the authors defend the plugin from adding locations category…

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    @rplakas or anyone did you try to call certain category locations and show them up on the map?

    Not able to get the map to display for certain location categories…still playing with it though, maybe enabling tags for locations would be easier?

Viewing 15 replies - 1 through 15 (of 42 total)
  • The topic ‘locations' category’ is closed to new replies.