Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*---------------------------code for custom post type------------------*/
- function my_custom_post_product() {
- $labels = array(
- 'name' => _( 'advisor' ),
- 'singular_name' => _( 'advisor' ),
- 'add_new' => _( 'Add New' ),
- 'add_new_item' => __( 'Add New advisor' ),
- 'edit_item' => __( 'Edit advisor' ),
- 'new_item' => __( 'New advisor' ),
- 'all_items' => __( 'All advisor' ),
- 'view_item' => __( 'View advisor' ),
- 'search_items' => __( 'Search advisor' ),
- 'not_found' => __( 'No advisor found' ),
- 'not_found_in_trash' => __( 'No advisor found in the Trash' ),
- 'parent_item_colon' => '',
- 'menu_name' => 'advisor'
- );
- $args = array(
- 'labels' => $labels,
- 'description' => 'Our advisors are here',
- 'public' => true,
- 'menu_position' => 5,
- 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments','custom-fields' ),
- 'has_archive' => true,
- );
- register_post_type( 'advisor', $args );
- }
- add_action( 'init', 'my_custom_post_product' );
- /*---------------------------code for custom texnomoy------------------*/
- // Register Custom Taxonomy
- function rx_lawyer_category() {
- $labels = array(
- 'name' => _x( 'Lawyer Category', 'Taxonomy General Name', 'rx_theme' ),
- 'singular_name' => _x( 'Lawyer Category', 'Taxonomy Singular Name', 'rx_theme' ),
- 'menu_name' => __( 'Lawyer Category', 'rx_theme' ),
- 'all_items' => __( 'All Items', 'rx_theme' ),
- 'parent_item' => __( 'Parent Lawyer Category', 'rx_theme' ),
- 'parent_item_colon' => __( 'Parent Lawyer Category:', 'rx_theme' ),
- 'new_item_name' => __( 'New Lawyer Category Name', 'rx_theme' ),
- 'add_new_item' => __( 'Add New Lawyer Category', 'rx_theme' ),
- 'edit_item' => __( 'Edit Lawyer Category', 'rx_theme' ),
- 'update_item' => __( 'Update Lawyer Category', 'rx_theme' ),
- 'separate_items_with_commas' => __( 'Separate Lawyer Categorys with commas', 'rx_theme' ),
- 'search_items' => __( 'Search Lawyer Category', 'rx_theme' ),
- 'add_or_remove_items' => __( 'Add or remove Lawyer Category', 'rx_theme' ),
- 'choose_from_most_used' => __( 'Choose from the most used Lawyer Category', 'rx_theme' ),
- 'not_found' => __( 'Not Found', 'rx_theme' ),
- );
- $args = array(
- 'labels' => $labels,
- 'hierarchical' => true,
- 'public' => true,
- 'show_ui' => true,
- 'show_admin_column' => true,
- 'show_in_nav_menus' => true,
- 'show_tagcloud' => false,
- 'query_var' => true,
- );
- register_taxonomy( 'lawyer_category', array( 'rx_lawyer' ), $args );
- }
- // Hook into the 'init' action
- add_action( 'init', 'rx_lawyer_category', 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement