WordPress.org

Ready to get started?Download WordPress

Forums

portfolio theme and clients page (1 post)

  1. fedeciccio
    Member
    Posted 2 years ago #

    hi i have aware theme, and i want improve it whit a client page.
    i have to insert a post_tag at the portfolio.
    someone can help me?
    this is the code from the functions.php file

    thanks to all

    add_action( 'init', 'create_portfolio_post_types' );
    
    function create_portfolio_post_types() {
    	register_post_type( 'portfolio',
    		array(
    			  'labels' => array(
    			  'name' => __( 'Portfolio', 'framework'),
    			  'singular_name' => __( 'Portfolio Item', 'framework'),
    			  'add_new' => __( 'Add New', 'framework' ),
    		   	  'add_new_item' => __( 'Add New Portfolio Item', 'framework'),
    			  'edit' => __( 'Edit', 'framework' ),
    	  		  'edit_item' => __( 'Edit Portfolio Item', 'framework'),
    	          'new_item' => __( 'New Portfolio Item', 'framework'),
    			  'view' => __( 'View Portfolio', 'framework'),
    			  'view_item' => __( 'View Portfolio Item', 'framework'),
    			  'search_items' => __( 'Search Portfolio Items', 'framework'),
    	  		  'not_found' => __( 'No Portfolios found', 'framework'),
    	  		  'not_found_in_trash' => __( 'No Portfolio Items found in Trash', 'framework'),
    			  'parent' => __( 'Parent Portfolio', 'framework'),
    			),
    			'menu_icon' => get_stylesheet_directory_uri() . '/admin/images/icons/photos.png',
    			'public' => true,
    			'supports' => array(
    				'title',
    				'editor',
    				'thumbnail',
    				'comments'),
    		)
    	);
    }
    
    //hook into the init action and call create_book_taxonomies when it fires
    add_action( 'init', 'ag_create_taxonomies', 0 );
    
    //create two taxonomies, genres and writers for the post type "book"
    function ag_create_taxonomies()
    {
      // Add new taxonomy, make it hierarchical (like categories)
      $labels = array(
        'name' => _x( 'Sort', 'taxonomy general name', 'framework'),
        'singular_name' => _x( 'Skill', 'taxonomy singular name', 'framework'),
        'search_items' =>  __( 'Search Skills', 'framework'),
        'all_items' => __( 'All Skills', 'framework'),
        'parent_item' => __( 'Parent Skill', 'framework'),
        'parent_item_colon' => __( 'Parent Skill:', 'framework'),
        'edit_item' => __( 'Edit Skill', 'framework'),
        'update_item' => __( 'Update Skill', 'framework'),
        'add_new_item' => __( 'Add New Skill', 'framework'),
        'new_item_name' => __( 'New Skill Name', 'framework'),
        'menu_name' => __( 'Skills', 'framework'),
      ); 	
    
      register_taxonomy('sort',array('portfolio'), array(
        'hierarchical' => true,
        'labels' => $labels,
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => array( 'slug' => 'sort' ),
      ));
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.