manendra
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [WP Models] Model Categories?hello mikewiesman you can add taxonomoy = category for models post type .under plugind directory go to plugins->wp-models->app->models open model_cpt_models.php file and add this line ‘taxonomies’ => array(‘category’), in init_args function’s $this->args = array();
Before :protected function init_args( $uri, $txtdomain ) { $labels = array( 'name' => _x( 'Models', 'Post Type General Name', $txtdomain ), 'singular_name' => _x( 'Model', 'Post Type Singular Name', $txtdomain ), 'menu_name' => __( 'Models', $txtdomain ), 'parent_item_colon' => __( 'Parent Model', $txtdomain ), 'all_items' => __( 'All Models', $txtdomain ), 'view_item' => __( 'View Model', $txtdomain ), 'add_new_item' => __( 'Add New Model', $txtdomain ), 'add_new' => __( 'New Model', $txtdomain ), 'edit_item' => __( 'Edit Model', $txtdomain ), 'update_item' => __( 'Update Model', $txtdomain ), 'search_items' => __( 'Search models', $txtdomain ), 'not_found' => __( 'No models found', $txtdomain ), 'not_found_in_trash' => __( 'No models found in Trash', $txtdomain ), ); $this->args = array( 'description' => __( 'Models', $txtdomain ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_icon' => trailingslashit( $uri ) . 'images/model-icon.png', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => array( 'slug' => 'models' ) ); }
After :
protected function init_args( $uri, $txtdomain ) { $labels = array( 'name' => _x( 'Models', 'Post Type General Name', $txtdomain ), 'singular_name' => _x( 'Model', 'Post Type Singular Name', $txtdomain ), 'menu_name' => __( 'Models', $txtdomain ), 'parent_item_colon' => __( 'Parent Model', $txtdomain ), 'all_items' => __( 'All Models', $txtdomain ), 'view_item' => __( 'View Model', $txtdomain ), 'add_new_item' => __( 'Add New Model', $txtdomain ), 'add_new' => __( 'New Model', $txtdomain ), 'edit_item' => __( 'Edit Model', $txtdomain ), 'update_item' => __( 'Update Model', $txtdomain ), 'search_items' => __( 'Search models', $txtdomain ), 'not_found' => __( 'No models found', $txtdomain ), 'not_found_in_trash' => __( 'No models found in Trash', $txtdomain ), ); $this->args = array( 'description' => __( 'Models', $txtdomain ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'taxonomies' => array('category'), 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_icon' => trailingslashit( $uri ) . 'images/model-icon.png', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => array( 'slug' => 'models' ) ); }
Viewing 1 replies (of 1 total)