What is the custom post type used for venues?

Home Forums Calendar Products Events Calendar PRO What is the custom post type used for venues?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1005209
    dpeschio
    Participant

    I need to separate and display venues based on categories. I have used the code generator here: https://generatewp.com to create a custom category set for venues and it displays and functions just fine for ‘posts’. I need to change that to the custom post type for venues but can’t find what that is.

    current line: register_taxonomy( 'tribe_venue_category', array( 'post', 'VENUE CUSTOM POST TYPE NEEDED' ), $args );

    full code added to functions.php

    function venue_category() {
    
    	$labels = array(
    		'name'                       => _x( 'Venue Categories', 'Taxonomy General Name', 'text_domain' ),
    		'singular_name'              => _x( 'Venue Category', 'Taxonomy Singular Name', 'text_domain' ),
    		'menu_name'                  => __( 'Venue Category', 'text_domain' ),
    		'all_items'                  => __( 'Venue Categories', 'text_domain' ),
    		'parent_item'                => __( 'Parent Venue Category', 'text_domain' ),
    		'parent_item_colon'          => __( 'Parent Venue Category:', 'text_domain' ),
    		'new_item_name'              => __( 'New Venue Category', 'text_domain' ),
    		'add_new_item'               => __( 'Add New Venue Category', 'text_domain' ),
    		'edit_item'                  => __( 'Edit Venue Category', 'text_domain' ),
    		'update_item'                => __( 'Update Venue Category', 'text_domain' ),
    		'view_item'                  => __( 'View Item', 'text_domain' ),
    		'separate_items_with_commas' => __( 'Separate venue categories with commas', 'text_domain' ),
    		'add_or_remove_items'        => __( 'Add or remove venue categoriess', 'text_domain' ),
    		'choose_from_most_used'      => __( 'Choose from the most used venue categories', 'text_domain' ),
    		'popular_items'              => __( 'Popular Items', 'text_domain' ),
    		'search_items'               => __( 'Search venues', 'text_domain' ),
    		'not_found'                  => __( 'Not Found', 'text_domain' ),
    	);
    	$args = array(
    		'labels'                     => $labels,
    		'hierarchical'               => true,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    	);
    	register_taxonomy( 'tribe_venue_category', array( 'post' ), $args );
    
    }
    add_action( 'init', 'venue_category', 0 );
    
    }
    #1005307
    dpeschio
    Participant

    I dug through the sites database and found what I needed – tribe_venue. It would be super helpful if categories for venues were a standard feature. Heres the code that worked for me:

    // Register Custom Taxonomy for Events Venues
    function venue_category() {
    
    	$labels = array(
    		'name'                       => _x( 'Venue Categories', 'Taxonomy General Name', 'text_domain' ),
    		'singular_name'              => _x( 'Venue Category', 'Taxonomy Singular Name', 'text_domain' ),
    		'menu_name'                  => __( 'Venue Category', 'text_domain' ),
    		'all_items'                  => __( 'Venue Categories', 'text_domain' ),
    		'parent_item'                => __( 'Parent Venue Category', 'text_domain' ),
    		'parent_item_colon'          => __( 'Parent Venue Category:', 'text_domain' ),
    		'new_item_name'              => __( 'New Venue Category', 'text_domain' ),
    		'add_new_item'               => __( 'Add New Venue Category', 'text_domain' ),
    		'edit_item'                  => __( 'Edit Venue Category', 'text_domain' ),
    		'update_item'                => __( 'Update Venue Category', 'text_domain' ),
    		'view_item'                  => __( 'View Item', 'text_domain' ),
    		'separate_items_with_commas' => __( 'Separate venue categories with commas', 'text_domain' ),
    		'add_or_remove_items'        => __( 'Add or remove venue categoriess', 'text_domain' ),
    		'choose_from_most_used'      => __( 'Choose from the most used venue categories', 'text_domain' ),
    		'popular_items'              => __( 'Popular Items', 'text_domain' ),
    		'search_items'               => __( 'Search venues', 'text_domain' ),
    		'not_found'                  => __( 'Not Found', 'text_domain' ),
    	);
    	$args = array(
    		'labels'                     => $labels,
    		'hierarchical'               => true,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    	);
    	register_taxonomy( 'tribe_venue_category', array( 'tribe_venue' ), $args );
    
    }
    add_action( 'init', 'venue_category', 0 );
    
    }
    #1005804
    Brian
    Member

    I am glad to see you were able to figure it out.

    If you would like to request that feature please head to our UserVoice Page and add your own or upvote that feature as they will increase the chances of it being added to a future version.

    http://tribe.uservoice.com/forums/195723-feature-ideas

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘What is the custom post type used for venues?’ is closed to new replies.