• I need to get the category name in order to do some stuff with a menu. Would be easy but this is from a portfolio so normal ways don’t work. Here is what I have.

    // Register portfolio taxonomy.
    		register_taxonomy( 'portfolio-category', 'portfolio', array(
    			'labels' => array(
    				'name' => __( 'Portfolio Categories', 'eqfw' ),
    				'singular_name' => __( 'Portfolio Category', 'eqfw' ),
    				'search_items' =>  __( 'Search Categories', 'eqfw' ),
    				'all_items' => __( 'All Categories', 'eqfw' ),
    				'edit_item' => __( 'Edit Category', 'eqfw' ),
    				'update_item' => __( 'Update Category', 'eqfw' ),
    				'add_new_item' => __( 'Add New Category', 'eqfw' ),
    				'new_item_name' => __( 'New Category Name', 'eqfw' ),
    				'menu_name' => __( 'Categories', 'eqfw' )
    			)
    		) );

    and I am trying to jsut return the category name using something like the below.

    $obj = get_post_type_object('taxomies');
    print $obj->taxonomies->singular_name;

    Any ideas?

  • The topic ‘Getting Category Name from Portfolio’ is closed to new replies.