for the 600 x 150 image: You can change the names and dimensions to whatever you like. Enjoy! */ add_filter( 'image_size_names_choose', 'bones_custom_image_sizes' ); function bones_custom_image_sizes( $sizes ) { return array_merge( $sizes, array( 'bones-thumb-600' => __('600px by 150px'), 'bones-thumb-300' => __('300px by 100px'), ) ); } /* The function above adds the ability to use the dropdown menu to select the new images sizes you have just created from within the media manager when you add media to your content blocks. If you add more image sizes, duplicate one of the lines in the array and name it according to your new image size. */ /************* THEME CUSTOMIZE *********************/ /* A good tutorial for creating your own Sections, Controls and Settings: http://code.tutsplus.com/series/a-guide-to-the-wordpress-theme-customizer--wp-33722 Good articles on modifying the default options: http://natko.com/changing-default-wordpress-theme-customization-api-sections/ http://code.tutsplus.com/tutorials/digging-into-the-theme-customizer-components--wp-27162 To do: - Create a js for the postmessage transport method - Create some sanitize functions to sanitize inputs - Create some boilerplate Sections, Controls and Settings */ function bones_theme_customizer($wp_customize) { // $wp_customize calls go here. // // Uncomment the below lines to remove the default customize sections $wp_customize->remove_section('title_tagline'); $wp_customize->remove_section('colors'); $wp_customize->remove_section('background_image'); $wp_customize->remove_section('static_front_page'); $wp_customize->remove_section('nav'); // Uncomment the below lines to remove the default controls $wp_customize->remove_control('blogdescription'); // Uncomment the following to change the default section titles // $wp_customize->get_section('colors')->title = __( 'Theme Colors' ); // $wp_customize->get_section('background_image')->title = __( 'Images' ); } add_action( 'customize_register', 'bones_theme_customizer' ); /************* ACTIVE SIDEBARS ********************/ // Sidebars & Widgetizes Areas function bones_register_sidebars() { register_sidebar(array( 'id' => 'sidebar1', 'name' => __( 'Sidebar 1', 'bonestheme' ), 'description' => __( 'The first (primary) sidebar.', 'bonestheme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); /* to add more sidebars or widgetized areas, just copy and edit the above sidebar code. In order to call your new sidebar just use the following code: Just change the name to whatever your new sidebar's id is, for example: register_sidebar(array( 'id' => 'sidebar2', 'name' => __( 'Sidebar 2', 'bonestheme' ), 'description' => __( 'The second (secondary) sidebar.', 'bonestheme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); To call the sidebar in your template, you can just copy the sidebar.php file and rename it to your sidebar's name. So using the above example, it would be: sidebar-sidebar2.php */ } // don't remove this bracket! /************* COMMENT LAYOUT *********************/ // Comment Layout function bones_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; ?>
>
' ); */ ?> %1$s %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>
comment_approved == '0') : ?>

$depth, 'max_depth' => $args['max_depth']))) ?>
is added by WordPress automatically ?> _x('Mitarbeiter', 'Post Type General Name', 'theme'), 'singular_name' => _x('Mitarbeiter', 'Post Type Singular Name', 'theme'), 'menu_name' => __('Mitarbeiter', 'theme'), 'name_admin_bar' => __('Mitarbeiter', 'theme'), 'parent_item_colon' => __('Parent Mitarbeiter:', 'theme'), 'all_items' => __('All Mitarbeiter', 'theme'), 'add_new_item' => __('Add New Mitarbeiter', 'theme'), 'add_new' => __('Add New', 'theme'), 'new_item' => __('New Mitarbeiter', 'theme'), 'edit_item' => __('Edit Mitarbeiter', 'theme'), 'update_item' => __('Update Mitarbeiter', 'theme'), 'view_item' => __('View Mitarbeiter', 'theme'), 'search_items' => __('Search Mitarbeiter', 'theme'), 'not_found' => __('Not found', 'theme'), 'not_found_in_trash' => __('Not found in Trash', 'theme'), ); $args = array( 'label' => __('mitarbeiter', 'theme'), 'labels' => $labels, 'description' => __('Team', 'theme'), 'supports' => array('title', 'thumbnail'), //'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'menu_icon' => 'dashicons-id', ); register_post_type( 'mitarbeiter', $args ); } add_action('init', 'projekte', 0); function projekte() { $labels = array( 'name' => _x('Projekte', 'Post Type General Name', 'theme'), 'singular_name' => _x('Projek', 'Post Type Singular Name', 'theme'), 'menu_name' => __('Projekte', 'theme'), 'name_admin_bar' => __('Projekte', 'theme'), 'parent_item_colon' => __('Parent Projekte:', 'theme'), 'all_items' => __('All Projekte', 'theme'), 'add_new_item' => __('Add New project', 'theme'), 'add_new' => __('Add New', 'theme'), 'new_item' => __('New project', 'theme'), 'edit_item' => __('Edit project', 'theme'), 'update_item' => __('Update project', 'theme'), 'view_item' => __('View projects', 'theme'), 'search_items' => __('Search projects', 'theme'), 'not_found' => __('Not found', 'theme'), 'not_found_in_trash' => __('Not found in Trash', 'theme'), ); $args = array( 'label' => __('projekte', 'theme'), 'labels' => $labels, 'description' => __('Team', 'theme'), 'supports' => array('title', 'thumbnail'), //'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'menu_icon' => 'dashicons-store', ); register_post_type( 'projekte', $args ); } add_action('init', 'baugruppen', 0); function baugruppen() { $labels = array( 'name' => _x('Baugruppen', 'Post Type General Name', 'theme'), 'singular_name' => _x('Baugruppe', 'Post Type Singular Name', 'theme'), 'menu_name' => __('Baugruppen', 'theme'), 'name_admin_bar' => __('Baugruppen', 'theme'), 'parent_item_colon' => __('Parent Baugruppen:', 'theme'), 'all_items' => __('All Baugruppen', 'theme'), 'add_new_item' => __('Add New group', 'theme'), 'add_new' => __('Add New', 'theme'), 'new_item' => __('New group', 'theme'), 'edit_item' => __('Edit group', 'theme'), 'update_item' => __('Update group', 'theme'), 'view_item' => __('View groups', 'theme'), 'search_items' => __('Search groups', 'theme'), 'not_found' => __('Not found', 'theme'), 'not_found_in_trash' => __('Not found in Trash', 'theme'), ); $args = array( 'label' => __('baugruppen', 'theme'), 'labels' => $labels, 'description' => __('Team', 'theme'), 'supports' => array('title', 'thumbnail'), //'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'menu_icon' => 'dashicons-groups', ); register_post_type( 'baugruppen', $args ); } add_action('init', 'clients', 0); function clients() { $labels = array( 'name' => _x('Clients', 'Post Type General Name', 'theme'), 'singular_name' => _x('Client', 'Post Type Singular Name', 'theme'), 'menu_name' => __('Clients', 'theme'), 'name_admin_bar' => __('Clients', 'theme'), 'parent_item_colon' => __('Parent Clients:', 'theme'), 'all_items' => __('All Clients', 'theme'), 'add_new_item' => __('Add New client', 'theme'), 'add_new' => __('Add New', 'theme'), 'new_item' => __('New client', 'theme'), 'edit_item' => __('Edit client', 'theme'), 'update_item' => __('Update client', 'theme'), 'view_item' => __('View clients', 'theme'), 'search_items' => __('Search clients', 'theme'), 'not_found' => __('Not found', 'theme'), 'not_found_in_trash' => __('Not found in Trash', 'theme'), ); $args = array( 'label' => __('clients', 'theme'), 'labels' => $labels, 'description' => __('Team', 'theme'), 'supports' => array('title', 'thumbnail'), //'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'menu_icon' => 'dashicons-smiley', ); register_post_type( 'clients', $args ); } add_action('init', 'testimonials', 0); function testimonials() { $labels = array( 'name' => _x('testimonials', 'Post Type General Name', 'theme'), 'singular_name' => _x('Testimonial', 'Post Type Singular Name', 'theme'), 'menu_name' => __('testimonials', 'theme'), 'name_admin_bar' => __('testimonials', 'theme'), 'parent_item_colon' => __('Parent testimonials:', 'theme'), 'all_items' => __('All testimonials', 'theme'), 'add_new_item' => __('Add New testimonial', 'theme'), 'add_new' => __('Add New', 'theme'), 'new_item' => __('New testimonial', 'theme'), 'edit_item' => __('Edit testimonial', 'theme'), 'update_item' => __('Update testimonial', 'theme'), 'view_item' => __('View testimonials', 'theme'), 'search_items' => __('Search testimonials', 'theme'), 'not_found' => __('Not found', 'theme'), 'not_found_in_trash' => __('Not found in Trash', 'theme'), ); $args = array( 'label' => __('testimonials', 'theme'), 'labels' => $labels, 'description' => __('Team', 'theme'), 'supports' => array('title', 'thumbnail'), //'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'menu_icon' => 'dashicons-format-quote', ); register_post_type( 'testimonials', $args ); } add_action("admin_init", "admin_init"); function admin_init(){ // mitarbetier add_meta_box("mitarbeiter-position", "Position", "mitarbeiter_position", "mitarbeiter", "normal", "low"); add_meta_box("mitarbeiter-email", "Email", "mitarbeiter_email", "mitarbeiter", "normal", "low"); // Projekte add_meta_box("projekt-beschreibung", "Description", "projekt_beschreibung", "projekte", "normal", "low"); add_meta_box("projekt-link", "Link", "projekt_link", "projekte", "normal", "low"); // Baugruppen add_meta_box("baugruppe-link", "Link", "baugruppe_link", "baugruppen", "normal", "low"); // Baugruppen add_meta_box("client-link", "Link", "client_link", "clients", "normal", "low"); // Testimonials add_meta_box("bericht-text", "Text", "testimonial_text", "testimonials", "normal", "low"); add_meta_box("bericht-autor", "Autor", "testimonial_autor", "testimonials", "normal", "low"); add_meta_box("bericht-link", "Link", "testimonial_link", "testimonials", "normal", "low"); } function mitarbeiter_email(){ global $post; $custom = get_post_custom($post->ID); $mitarbeiter_email = $custom["mitarbeiter_email"][0]; ?> ID); $mitarbeiter_position = $custom["mitarbeiter_position"][0]; ?> ID); $projekt_beschreibung = $custom["projekt_beschreibung"][0]; ?> ID); $projekt_link = $custom["projekt_link"][0]; ?> ID); $baugruppe_link = $custom["baugruppe_link"][0]; ?> ID); $client_link = $custom["client_link"][0]; ?> ID); $testimonial_text = $custom["testimonial_text"][0]; ?> ID); $testimonial_autor = $custom["testimonial_autor"][0]; ?> ID); $testimonial_link = $custom["testimonial_link"][0]; ?> ID, "mitarbeiter_position", $_POST["mitarbeiter_position"]); update_post_meta($post->ID, "mitarbeiter_email", $_POST["mitarbeiter_email"]); // Projekte update_post_meta($post->ID, "projekt_beschreibung", $_POST["projekt_beschreibung"]); update_post_meta($post->ID, "projekt_link", $_POST["projekt_link"]); // baugruppen update_post_meta($post->ID, "baugruppe_link", $_POST["baugruppe_link"]); // clients update_post_meta($post->ID, "client_link", $_POST["client_link"]); // clients update_post_meta($post->ID, "testimonial_text", $_POST["testimonial_text"]); update_post_meta($post->ID, "testimonial_autor", $_POST["testimonial_autor"]); update_post_meta($post->ID, "testimonial_link", $_POST["testimonial_link"]); } add_image_size( 'projekt_thumb', 355, 236, true); add_image_size( 'general_thumb', 255, 255, true); // add_image_size( 'mitarbeiter_thumb', 255, 255, true); /* Baugrupen Kunden Testimonials */ function theme_settings_page() { ?>

Theme Panel