WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Locations cat. (15 posts)

  1. 3loY
    Member
    Posted 10 months ago #

    Hi,
    I would like to order all locations (places) by categories, for example:
    - Shops
    -- Shop #1
    -- Shop #2
    ...
    - Clubs:
    -- ClubName
    -- NameofClub
    etc.
    Can I?

    p.s. Sorry for my english, peace!

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

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 10 months ago #

    You'd probably need to code this out, because we don't have location list placeholders, nor do we have shortcodes to list custom taxonomies you create yourself.

  3. 3loY
    Member
    Posted 10 months ago #

    Is it possible to write a function: "Locations Categories" similarly to "Events Categories" ?
    May you help or show how?

  4. caimin_nwl
    NetWebLogic Support
    Posted 10 months ago #

    Take a look at this, it should help you create a shortcode that does what you want:
    http://pastebin.com/UMipT093

  5. 3loY
    Member
    Posted 10 months ago #

    And where I can add categories of locations?
    How I can show this categories on my homepage?

  6. caimin_nwl
    NetWebLogic Support
    Posted 10 months ago #

    Maybe I misunderstood what you meant. If all you want to do is list events by category, you can use a event_list shortcode with a category attribute. Like this:

    [events_list category="1"]

    In this example, 1 is the ID of the category you want to show.

    You can use that shortcode on the homepage or any other page.

  7. 3loY
    Member
    Posted 10 months ago #

    yep You don't understood me ):
    I would like put in order all my locations, but "locations" haven't category and tag functions as like "events" has.
    It`s clear?

  8. caimin_nwl
    NetWebLogic Support
    Posted 10 months ago #

    Then you'd need to use the code I linked to originally, which allows you to create lists that combine locations with categories.

    If you want to add categories / tags directly to locations - rather than combine them with the existing categories - you need to look into creating a custom taxonomy for the custom post type 'location'.

  9. 3loY
    Member
    Posted 10 months ago #

    If you want to add categories / tags directly to locations

    YEAP!

    look into creating a custom taxonomy for the custom post type 'location'.

    I got no idea "how" ):
    Could you help me?
    I`m so sorry for my stupid questions but I just began to learn php programming language.
    I know, very well, HTML and CSS also I can write some functions, conditions on JS (jQuery) ...

  10. angelo
    NetWebLogic Support
    Posted 10 months ago #

    I think you can modify the snippet above share by caimin. - http://pastebin.com/UMipT093

  11. 3loY
    Member
    Posted 9 months ago #

    I did it.

    // register taxonom
    add_action( 'init', 'rmcc_create_taxonomies', 0 );
    function rmcc_create_taxonomies() {
    // cats taxonomy
    $labels = array(
    'name' => _x( 'Cats', 'taxonomy general name' ),
    'singular_name' => _x( 'Cat', 'taxonomy singular name' ),
    'search_items' => __( 'Search Cat' ),
    'all_items' => __( 'All Cat' ),
    'parent_item' => __( 'Parent Cat' ),
    'parent_item_colon' => __( 'Parent Cat:' ),
    'edit_item' => __( 'Edit Cat' ),
    'update_item' => __( 'Update Cat' ),
    'add_new_item' => __( 'Add New Cat' ),
    'new_item_name' => __( 'New Cat' ),
    'menu_name' => __( 'Категории мест' ),
    );
    register_taxonomy(
    'cats',
    'event',
    array(
    'hierarchical' => true,
    'labels' => $labels,
    'query_var' => true,
    'rewrite' => true,
    'show_admin_column' => true
    )
    );
    }

    resolved!

  12. 3loY
    Member
    Posted 9 months ago #

    OH no ):
    Links such as MYSITE/cats/clubs don`t work
    Could You help me fix it?

  13. 3loY
    Member
    Posted 9 months ago #

    I mean I can create some other categories but links are broken

    // Custom Taxonomy Code
    add_action( 'init', 'build_taxonomies', 0 );
    function build_taxonomies() {
        register_taxonomy( 'cats', EM_POST_TYPE_EVENT, array( 'hierarchical' => true, 'label' => 'Categories', 'query_var' => true, 'rewrite' => true ) );
    }
  14. caimin_nwl
    NetWebLogic Support
    Posted 9 months ago #

    Have you tried re-saving your permalinks (Settings > Permalinks)?

  15. 3loY
    Member
    Posted 9 months ago #

    thnx :)

Reply

You must log in to post.

About this Plugin

About this Topic