README.md in edge_framework-2.1.0 vs README.md in edge_framework-2.1.1

- old
+ new

@@ -178,32 +178,40 @@ WORDPRESS ==================== ![Edge Wordpress](http://cdn.setyono.net/edge/wp-edge.jpg) -Our WordPress template requires [Timber](http://upstatement.com/timber/). It is a template engine that separates PHP and HTML into their own file. +Our WordPress template requires [Timber](https://wordpress.org/plugins/timber-library/). It is a template engine that separates PHP and HTML into their own file, reducing the amount of "spaghetti" code. -So, download and include [its plugin](https://wordpress.org/plugins/timber-library/) into your WordPress installation. - -Custom Post Type +CPT - Custom Post Type -------------------- ![Wordpress Custom Type](http://cdn.setyono.net/edge/wp-post-type.jpg) - add_post_type( $name, <$icon>, <$taxonomy> ) + add_post_type( $name, <$args_array> ) -Inside `functions.php`, add these codes: +**Note**: The `$name` must be one-word, singular, and titleized case. Example: - add_post_type("Product", "cart", "Brand"); - add_post_type("Event", "calendar"); + add_post_type( "Product" ); + add_post_type( "Event" ); -The icon name is taken from [melchoyce.github.io/dashicons/](http://melchoyce.github.io/dashicons/). +Optional arguments list: -**Note**: +`icon` - Icon names are listed here [melchoyce.github.io/dashicons/](http://melchoyce.github.io/dashicons/). Exclude the "dashicons-". -- If you want pagination to work, the `$name` cannot be the same as any page's slug. +`taxonomy` - The custom category term. The naming convention is the same as CPT's name. -- All type's name and taxonomy's name must be **singular** and no special character except space. +`columns` - Array of columns shown in admin panel. Possible values are: `title`, `author`, `date`, `thumbnail`, and any custom field. + +Example: + + add_post_type( "Product" , array( + "icon" => "cart", + "taxonomy" => "Brand", + "columns" => array("thumbnail", "title^", "price^", "date") + ) ); + +Notice the `^` at the end of column's name? That indicates that the column is sortable. COMPASS ================= ![Edge Compass](http://cdn.setyono.net/edge/compass-edge.jpg) \ No newline at end of file