WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] locations' category (43 posts)

  1. M Szatkowski
    Member
    Posted 1 year ago #

    could you consider locations' category in the next update please?

    thanks!

    http://wordpress.org/extend/plugins/events-manager/

  2. M Szatkowski
    Member
    Posted 1 year ago #

    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?

  3. agelonwl
    Member
    Posted 1 year ago #

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

  4. M Szatkowski
    Member
    Posted 1 year ago #

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

  5. agelonwl
    Member
    Posted 1 year ago #

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

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

  6. M Szatkowski
    Member
    Posted 1 year ago #

    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

  7. M Szatkowski
    Member
    Posted 1 year ago #

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

  8. adzay
    Member
    Posted 1 year ago #

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

  9. M Szatkowski
    Member
    Posted 1 year ago #

    you meant locations one ;)

    yep.. I feel we're close to the target...

    @agelonwl any suggestion pleease?

  10. adzay
    Member
    Posted 1 year ago #

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

  11. M Szatkowski
    Member
    Posted 1 year ago #

    they probably work mon-fri, so I hope we agelonwl will answer on monday ;)

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    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!

  13. rplakas
    Member
    Posted 1 year ago #

    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.

  14. M Szatkowski
    Member
    Posted 1 year ago #

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

  15. M Szatkowski
    Member
    Posted 1 year ago #

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

  16. rplakas
    Member
    Posted 1 year ago #

    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?

  17. M Szatkowski
    Member
    Posted 1 year ago #

    well... I'd stay at loc. categories to build the map.
    I've got to look into how [locations_map] shortcode is built and on that foundation we'd make the map ;)

    stay tuned! :)

  18. rplakas
    Member
    Posted 1 year ago #

    Mariusz,

    Do you mind sharing the final code you used in functions.php to get your location categories working?

    I can add it to my test site to try and help solve this mystery ;-)

    Rich

  19. M Szatkowski
    Member
    Posted 1 year ago #

    Rich - sure, I can share it. But I've done nothing to the functions.php in my theme.

    I've set up taxonomy via Ultimate Taxonomy Manager and that's it.

    Look at category.php of mine:
    http://www.copypastecode.com/530524/

  20. wp-solution.com
    Member
    Posted 1 year ago #

    mariusz by this method is it possible to solve this problem?

    http://wordpress.org/support/topic/event-list-by-location?replies=5

  21. M Szatkowski
    Member
    Posted 1 year ago #

    @wp-solution.com well. we consider listing category locations right here with the map...

    This plugin has native funcionality to list locations events either you want to do something weird.. ;)

  22. rplakas
    Member
    Posted 1 year ago #

    @wp-solution.com I think @Mariusz and I(& a others) are trying to do something similar.

    I have a site where I need to list locations(or show a map of location) by a location type(category): bars, brewpubs & breweries.

    Location Categories or Tags do not exist natively with the Events Manager plugin.

    If you add this Location Category functionality via a Custom Taxonomy/Post-type the shortcodes for showing maps wont let you filter based on the custom location type.

  23. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I don't know why the authors defend the plugin from adding locations category...

    because it's easy to add custom taxonomies with another plugin or a few lines of code. our events categories/tags go further than standar CTs by being available for filtering in our shortocde etc.

  24. rplakas
    Member
    Posted 1 year ago #

    Hi Marcus,

    I was able to add the custom taxonomies with another plugin and that works great!

    But how do I get the event manager shortcodes to use the new custom taxonomies?

    For example I want to show a map of only brewery locations:
    http://richplakas.wpengine.com/location-type/brewery/

    I tried: [locations_map location-type="brewery"] but that just brings up a map of everything: http://richplakas.wpengine.com/austin-brewery-map/

    Thanks!

  25. M Szatkowski
    Member
    Posted 1 year ago #

    @Marcus
    If it's so easy to implement why don't you give an opportunity for WP-dummies to do it thanks to one plugin?

  26. M Szatkowski
    Member
    Posted 1 year ago #

    This built-in function might be introduced with the map - on map there could be displayed certain category locations in the nearby area having similar events (eg. friday concerts in pubs)

  27. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    our events categories/tags go further than standar CTs by being available for filtering in our shortocde etc.

    adding a custom taxonomy and attaching it to any CPT is easy, however creating a custom search attribute integrating with our shortcode is harder and requires PHP experience - http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/ mixed in with the alternate method mentioned on that page.

    We get asked this quite often, so certainly something we can considre adding ourselves, but we have a lot of requests for new features so we need to work through these first.

  28. rplakas
    Member
    Posted 1 year ago #

    Unfortunately those tutorials combined with my minute PHP skills don't help me with getting search attributes working with Custom Taxonomies I setup.

    Are there any other tutorials that could get me pointed in the right direction?

  29. M Szatkowski
    Member
    Posted 1 year ago #

    We get asked this quite often, so certainly something we can considre adding ourselves, but we have a lot of requests for new features so we need to work through these first.

    I'm keeping my fingers crossed for you. If you add custom pin image to the locations map category - you'd make my day!

  30. jalbaiges
    Member
    Posted 1 year ago #

    @Mariusz, @rplakas could you finally show a map with locations filtered by category? If so, could you guide me a little bit? Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.